Prediction image generation device, moving image decoding device, and moving image coding device

ABSTRACT

Coding efficiency is improved. A motion compensation filter unit acts on a motion vector applied image obtained by acting a motion vector on a reference image. The motion compensation filter unit causes filter coefficients mcFilter[i][k] designated by a phase i and a filter coefficient position k to act on the motion vector applied image. The filter coefficients mcFilter[i][k] includes filter coefficients calculated by using filter coefficients mcFilter[p][k] (p≠i) and filter coefficients mcFilter[q][k] (q≠i).

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. application Ser. No.17/149,010, filed on Jan. 14, 2021, which is a continuation of U.S.application Ser. No. 16/074,049, filed Jul. 30, 2018, which is aNational Stage of International Application No. PCT/JP2017/002764, filedon Jan. 26, 2017, which claims priority based to JP 2016-017444, filedon Feb. 1, 2016, the contents of which are incorporated herein byreference in their entirety.

TECHNICAL FIELD

The disclosure relates to a prediction image generation device, a videodecoding device, and a video coding device.

BACKGROUND ART

In order to efficiently transmit or record a video, there have been useda video coding device which generates coded data by coding a video, anda video decoding device which generates a decoded image by decoding thecoded data.

Specific examples of a video coding scheme include schemes proposed inH.264/MPEG-4. AVC or High-Efficiency Video Coding (HEVC).

In such a video coding scheme, images (pictures) constituting a videoare managed by a hierarchical structure including slices obtained bydiving the images, units of coding (also referred to as Coding Units)obtained by dividing the slices, and prediction units (PUs) andtransform units (TUs) which are blocks obtained by dividing the codingunits, and each block is coded/decoded.

In such a video coding scheme, generally, an input image iscoded/decoded to obtain a local decoded image, based on which localdecoded image a prediction image is generated, the prediction image issubtracted from the input image (original image) to obtain a predictionresidual (also referred to as a “difference image” or a “residualimage”), and the prediction residual is coded. Examples of a method forgenerating a prediction image include inter-prediction, andintra-prediction.

Examples of recent technologies of video coding and decoding include NPL1.

CITATION LIST Non Patent Literature

NPL 1: Video/JVET, “Algorithm Description of Joint Exploration TestModel1 (JEM 1)”, INTERNATIONAL ORGANIZATION FOR STANDARDIZATION ORGANISATIONINTERNATIONALE DE NORMALISATION ISO/IEC JTC1/SC29/WG11 CODING OF MOVINGPICTURES AND AUDIO, ISO/IEC JTC1/SC29/WG11/N15790, October 2015, Geneva,CH.

SUMMARY Technical Problem

In the recent technologies of video coding and decoding, a motioncompensation filter is used in motion compensation processing when aprediction image is generated. On the other hand, an increase inaccuracy of motion compensation increases necessary filter coefficients,and a first problem arises that a capacity of a memory needed to storefilter coefficients increases.

Further, in the recent technologies of video coding and decoding, aprediction image is generated by using a motion vector with highaccuracy. On the other hand, a code amount of a difference vectorincreases to use a motion vector with high accuracy. Thus, a secondproblem arises that coding efficiency is not necessarily improved.

The disclosure provides an image decoding device, an image codingdevice, and a prediction image generation device capable of solving atleast any of the first and second problems.

Solution to Problem

To solve the above-described problems, a prediction image generationdevice according to one aspect of the disclosure is a prediction imagegeneration device for generating a prediction image by performing motioncompensation on a reference image. The prediction image generationdevice includes a filter unit configured to act on a motion vectorapplied image with 1/Mac pixel accuracy obtained by acting a motionvector on the reference image, wherein the filter unit causes filterprocessing using filter coefficients mcFilter[i][k] designated by aphase i (where i is an integer of 0 or greater and Mac-1 or less) and afilter coefficient position k (where k is an integer of 0 or greater andNtaps-1 or less, Ntaps is the number of taps) to act on the motionvector applied image, and the filter coefficients mcFilter[i][k] have arelationship of a weighted average between filter coefficientsmcFilter[p][k] (P≠i) and filter coefficients mcFilter[q][k] (Q≠i).

To solve the above-described problems, a prediction image generationdevice according to one aspect of the disclosure is a prediction imagegeneration device for generating a prediction image for each predictionblock by performing motion compensation on a reference image, theprediction image generation device including: a motion vector derivationunit configured to derive a motion vector for each prediction block byadding a difference vector to a prediction vector or subtracting thedifference vector from the prediction vector, wherein the motion vectorderivation unit switches accuracy of a motion vector derived for theprediction block according to the size of the prediction block.

To solve the above-described problems, a prediction image generationdevice according to one aspect of the disclosure is a prediction imagegeneration device for generating a prediction image for each predictionblock by performing motion compensation on a reference image, theprediction image generation device including: a motion vector derivationunit configured to derive a motion vector for each prediction block byadding a difference vector to a prediction vector or subtracting thedifference vector from the prediction vector, wherein the motion vectorderivation unit switches accuracy of the motion vector derived for theprediction block according to magnitude of a quantization parameter forthe prediction block.

To solve the above-described problems, a prediction image generationdevice according to one aspect of the disclosure is a prediction imagegeneration device for generating a prediction image by performing motioncompensation on a reference image, the prediction image generationdevice including: a motion vector derivation unit configured to derive amotion vector by adding a dequantized difference vector to a predictionvector or subtracting the dequantized difference vector from theprediction vector, wherein the motion vector derivation unit switchesaccuracy of dequantization processing on a difference vector accordingto a quantization value of the quantized difference vector.

To solve the above-described problems, a prediction image generationdevice according to one aspect of the disclosure is a prediction imagegeneration device for generating a prediction image by performing motioncompensation on a reference image, the prediction image generationdevice including: a motion vector derivation unit configured to derive amotion vector by adding a difference vector to a prediction vector orsubtracting the difference vector from the prediction vector, whereinthe motion vector derivation unit switches accuracy of dequantizationprocessing on the difference vector according to a quantization value ofa quantized difference vector in a case that a flag indicating accuracyof the motion vector indicates a first value, and performs thedequantization processing on the difference vector with fixed accuracyregardless of a quantization value of the quantized difference vector ina case that the flag indicating accuracy of the motion vector indicatesa second value.

To solve the above-mentioned problems, a prediction image generationdevice according to one aspect of the disclosure is a prediction imagegeneration device for generating a prediction image by performing motioncompensation on a reference image, the prediction image generationdevice including: a motion vector derivation unit configured to derive amotion vector by adding a difference vector to a prediction vector orsubtracting the difference vector from the prediction vector, whereinthe motion vector derivation unit switches accuracy of dequantizationprocessing on the difference vector between first accuracy and secondaccuracy according to a quantization value of a quantized differencevector in a case that a flag indicating accuracy of the motion vectorindicates a first value, switches the accuracy of the dequantizationprocessing on the difference vector between third accuracy and fourthaccuracy according to the quantization value of the quantized differencevector in a case that a flag indicating the accuracy of the motionvector indicates a second value, and

at least any of the first accuracy and the second accuracy has higheraccuracy than the third accuracy and the fourth accuracy.

Advantageous Effects of Invention

According to the configuration above, at least any of the first andsecond problems can be solved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A to 1F are diagrams illustrating a hierarchical structure ofdata of a coded stream according to the present embodiment.

FIGS. 2A to 2H are diagrams illustrating patterns for a PU partitionmode. FIGS. 2A to 2H respectively illustrate partition shapes in casesthat the PU partition mode is 2N×2N, 2N×N, 2N×nU, 2N×nD, N×2N, nL×2N,nR×2N, and N×N.

FIG. 3 is a conceptual diagram illustrating an example of a referencepicture list.

FIG. 4 is a conceptual diagram illustrating an example of referencepictures.

FIG. 5 is a schematic diagram illustrating a configuration of an imagedecoding device according to the present embodiment.

FIG. 6 is a schematic diagram illustrating a configuration of aninter-prediction parameter decoding unit according to the presentembodiment.

FIG. 7 is a schematic diagram illustrating a configuration of a mergeprediction parameter derivation unit according to the presentembodiment.

FIG. 8 is a schematic diagram illustrating a configuration of an AMVPprediction parameter derivation unit according to the presentembodiment.

FIG. 9 is a conceptual diagram illustrating an example of vectorcandidates.

FIG. 10 is a schematic diagram illustrating a configuration of aninter-prediction parameter decoding control unit according to thepresent embodiment.

FIG. 11 is a schematic diagram illustrating a configuration of aninter-prediction image generation unit according to the presentembodiment.

FIG. 12 is a block diagram illustrating a configuration of an imagecoding device according to the present embodiment.

FIG. 13 is a schematic diagram illustrating a configuration of aninter-prediction parameter coding unit according to the presentembodiment.

FIG. 14 is a schematic diagram illustrating a configuration of an imagetransmission system according to an embodiment of the disclosure.

FIG. 15 is a flowchart illustrating a flow of inter-prediction syntaxdecoding processing performed by the inter-prediction parameter decodingcontrol unit according to the present embodiment.

FIG. 16 is a flowchart illustrating an example of difference vectordecoding processing according to the present embodiment.

FIG. 17 is a flowchart illustrating another example of the differencevector decoding processing according to the present embodiment.

FIGS. 18A and 18B are flowcharts illustrating a flow of motion vectorderivation processing performed by the inter-prediction parameterdecoding unit according to the present embodiment.

FIG. 19 is a flowchart illustrating an example of difference vectorderivation processing according to the present embodiment.

FIG. 20 is a flowchart illustrating an example of prediction vectorround processing according to the present embodiment.

FIG. 21 is a flowchart specifically illustrating an example of motionvector scale derivation processing according to the present embodiment.

FIG. 22 is a flowchart more specifically illustrating another example ofthe motion vector scale derivation processing according to the presentembodiment.

FIG. 23 is a flowchart more specifically illustrating another example ofthe motion vector scale derivation processing according to the presentembodiment.

FIGS. 24A to 24C are tables illustrating a relationship between basicvector accuracy according to the present embodiment and a parameter(shiftS) indicating motion vector accuracy configured (switched)depending on a block size of a target block.

FIGS. 25A to 25C are tables illustrating a relationship between basicvector accuracy and a parameter (shiftS) indicating motion vectoraccuracy configured (switched) depending on a block size of a targetblock and a motion vector accuracy flag according to the presentembodiment.

FIGS. 26A to 26C are tables illustrating a parameter (shiftS) indicatingmotion vector accuracy configured (switched) depending on QP accordingto the present embodiment.

FIGS. 27A and 27B are tables illustrating motion vector accuracy(shiftS) configured (switched) depending on QP according to the presentembodiment and a motion vector accuracy flag.

FIG. 28 is a graph illustrating a relationship between a quantizeddifference vector and a dequantized difference vector according to thepresent embodiment.

FIG. 29 is a flowchart more specifically illustrating another example ofthe motion vector scale derivation processing according to the presentembodiment.

FIG. 30 is a block diagram illustrating a specific configuration of amotion compensation unit according to the present embodiment.

FIG. 31 is a diagram illustrating one example of filter coefficientsaccording to the present embodiment.

FIG. 32A is a diagram illustrating an example in which the motioncompensation filter unit according to the present embodiment calculatesfilter coefficients of an odd phase from filter coefficients of an evenphase. FIG. 32B is a diagram illustrating an example in which the motioncompensation filter unit according to the present embodiment calculatesfilter coefficients of an even phase from filter coefficients of an oddphase.

FIGS. 33A and 33B are diagrams illustrating configurations of atransmission device equipped with the above image coding device and areception device equipped with the above image decoding device. FIG. 33Aillustrates the transmission device equipped with the image codingdevice and FIG. 33B illustrates the reception device equipped with theimage decoding device.

FIGS. 34A and 34B are diagrams illustrating configurations of arecording device equipped with the above image coding device and areproducing device equipped with the above image decoding device. FIG.34A illustrates the recording device equipped with the image codingdevice and FIG. 34B illustrates the reproducing device equipped with theimage decoding device.

DESCRIPTION OF EMBODIMENTS First Embodiment

Hereinafter, embodiments of the disclosure are described in detail withreference to the drawings.

FIG. 14 is a schematic diagram illustrating a configuration of an imagetransmission system 1 according to the present embodiment.

The image transmission system 1 is a system in which a code obtained bycoding a coding target image is transmitted and the image obtained bydecoding the transmitted code is displayed. The image transmissionsystem 1 is configured to include an image coding device (video codingdevice) 11, a network 21, an image decoding device (video decodingdevice) 31, and an image display device 41.

Signals T representing an image of a single layer or multiple layers areinput to the image coding device 11. A layer is a concept used todistinguish multiple pictures in a case that a certain time period isconstituted by one or more pictures. For example, scalable codingapplies in a case that the same picture is coded in multiple layerswhich are different in an image quality or resolution, and view scalablecoding applies in a case that pictures different in a viewpoint arecoded in multiple layers. In a case that prediction is performed betweenpictures of multiple layers (inter-layer prediction, inter-viewprediction), the coding efficiency is highly improved. Even in a casethat prediction is not performed (simulcast), the coded data can becollected.

The network 21 transmits a coded stream Te generated by the image codingdevice 11 to the image decoding device 31. The network 21 includes theInternet, a Wide Area Network (WAN), or a Local Area Network (LAN), or acombination thereof. The network 21 is not necessarily limited to abidirectional communication network, but may be a unidirectional orbidirectional communication network transmitting broadcast waves such asdigital terrestrial broadcasting and satellite broadcasting. The network21 may be substituted by a storage medium in which the coded stream Teis recorded such as a Digital Versatile Disc (DVD) and a Blue-ray Disc(BD).

The image decoding device 31 decodes each coded stream Te transmitted bythe network 21, and generates one or multiple decoded layer images Td(decoded viewpoint images Td).

The image display device 41 displays all or some of one or multipledecoded layer images Td generated by the image decoding device 31. Forexample, in the view scalable coding, in the case of displaying all, athree-dimensional image (stereoscopic image) or free-viewpoint image isdisplayed, and in the case of displaying some, a two-dimensional imageis displayed. The image display device 41 includes a display device, forexample, a liquid crystal display and an organic Electro-luminescence(EL) display. In spatial scalable coding and SNR scalable coding, theimage decoding device 31 and the image display device 41 display anenhancement layer image which is higher in an image quality in a case ofhaving high processing capability. The image decoding device 31 and theimage display device 41 display a base layer image for which therequired processing capability and display capability are not as high asthe enhancement layer in a case of having only lower processingcapability.

Structure of Coded Stream Te

Before describing in detail, for the image coding device 11 and theimage decoding device 31 according to the present embodiment, adescription is given of a data structure of the coded stream Te which isgenerated by the image coding device 11 and decoded by the imagedecoding device 31.

FIGS. 1A to 1F are diagrams illustrating a hierarchical structure ofdata in the coded stream Te. The coded stream Te exemplarily contains asequence and multiple pictures constituting the sequence. FIGS. 1A to 1Fare diagrams respectively illustrating a sequence layer specifying asequence SEQ, a picture layer specifying a picture PICT, a slice layerspecifying a slice S, a slice data layer specifying slice data, a codingtree layer specifying a coded tree unit included in the slice data, anda coded unit layer specifying a Coding Unit (CU) included in the codingtree.

Sequence Layer

The sequence layer specifies a set of data to which the image decodingdevice 31 refers in order to decode the sequence SEQ to be processed(hereinafter, also referred to as a target sequence). The sequence SEQcontains, as illustrated in FIG. 1A, a Video Parameter Set, a SequenceParameter Set (SPS), a Picture Parameter Set (PPS), a picture PICT, andSupplemental Enhancement Information (SEI). Here, a value following “#”indicates a layer ID. FIGS. 1A to 1F illustrate examples in which thereis coded data of #0 and #1, that is, a layer 0 and a layer 1, but typesof layer and the number of layers are not limited thereto.

The video parameter set VPS specifies, for a video configured withmultiple layers, set of coding parameters common to multiple videos anda set of coding parameters associated with multiple layers andindividual layers contained in the video.

The sequence parameter set SPS specifies a set of coding parameters towhich the image decoding device 31 refers in order to decode the targetsequence. For example, a width and height of a picture are specified.There may be multiple SPSs. In this case, any of multiple SPSs isselected from the PPS.

The picture parameter set PPS specifies a set of coding parameters towhich the image decoding device 31 refers in order to decode pictures inthe target sequence. For example, the PPS includes a reference value ofa quantization width (pic_init_qp_minus26) used to decode the pictureand a flag indicating that a weighted prediction is applied(weighted_pred_flag). There may be multiple PPSs. In this case, any ofmultiple PPSs is selected from the pictures in the target sequence.

Picture Layer

The picture layer specifies a set of data to which the image decodingdevice 31 refers in order to decode a picture PICT to be processed(hereinafter, also referred to as a target picture). The picture PICTcontains slices S0 to SNS−1 (NS represents the total number of slicescontained in the picture PICT) as illustrated in FIG. 1B.

Hereinafter, the slices S0 to SNS−1 may be expressed with their suffixesomitted in a case of being not necessary to be distinguished from eachother. The same holds for other data with a suffix which is contained inthe coded stream Te described below.

Slice Layer

The slice layer specifies a set of data to which the image decodingdevice 31 refers in order to decode a slice S to be processed (alsoreferred to as a target slice). The slice S contains a slice header SHand slice data SDATA, as illustrated in FIG. 1C.

The slice header SH contains a coding parameter group to which the imagedecoding device 31 refers in order to determine a method of decoding atarget slice. Slice type specifying information specifying a slice type(slice_type) is an example of the coding parameter contained in theslice header SH.

Examples of the slice type specifiable by the slice type specifyinginformation include (1) I slice that is coded using intra predictiononly, (2) P slice that is coded using unidirectional prediction orintra-prediction, and (3) B slice that is coded using unidirectionalprediction, bidirectional prediction, or intra prediction.

The slice header SH may include reference to the picture parameter setPPS (pic_parameter_set_id) which is contained in the above sequencelayer.

Slice Data Layer

The slice data layer specifies a set of data to which the image decodingdevice 31 refers in order to decode slice data SDATA to be processed.The slice data SDATA contains a Coded Tree Block (CTB) as illustrated inFIG. 1D. The CTB is a block having a fixed size (e.g., 64×64)constituting a slice, and may be also referred to as a Largest CordingUnit (LCU) or a Coded Tree Unit (CTU).

Coding Tree Layer

The coding tree layer specifies a set of data to which the imagedecoding device 31 refers in order to decode a coded tree block to beprocessed as illustrated in FIG. 1E. The coded tree block is partitionedby recursive quadtree partitioning. A node of a tree structure obtainedby the recursive quadtree partitioning is called a coding tree. Anintermediate node of the quadtree is a Coded Quad Tree (CQT) and thecoded tree block itself is specified as a top CQT. The CQT contains asplit flag (split_flag), and is partitioned into four coded tree unitsCQTs in a case that split_flag is 1. In a case that split_flag is 0, thecoded tree unit CQT is not partitioned and has one Coded Unit (CU) as anode. The coded unit CU is a terminal node of the coding tree layer andis not partitioned any further in this layer. The coding unit CU is abasic unit for coding processing.

In a case that a size of the coded tree block CTB is 64×64 pixel, a sizeof the coded unit may be any of 64×64 pixel, 32×32 pixel, 16×16 pixel,and 8×8 pixel.

Coded Unit Layer

The coded unit layer specifies a set of data to which the image decodingdevice 31 refers in order to decode a coded unit to be processed, asillustrated in FIG. 1F. Specifically, the coding unit includes a codingtree, a prediction tree, a transform tree, and a CU header CUF. Thecoding tree specifies a split flag, a division pattern, a predictionmode, and the like.

The prediction tree specifies prediction information (reference pictureindex, motion vector, and the like) of each of prediction blocks whichare obtained by partitioning the coded unit into one or multiple pieces.In other words, the prediction block/blocks is/are one or multiplenon-overlapping areas which constitute the coding unit. The predictiontree includes one or multiple prediction blocks which are obtained bythe above partitioning. Hereinafter, a unit of prediction obtained byfurther partitioning the prediction block is called a “sub-block”. Thesub-block (prediction block) is configured with one or multiples pixel.In a case that a size of the prediction block is equal to a size of thesub-block, the number of sub-blocks in the prediction block is one. In acase that a size of the prediction block is larger than a size of thesub-block, the prediction block is partitioned into the sub-blocks. Forexample, in a case that a size of the prediction block is 8×8 and a sizeof the sub-block is 4×4, the prediction block is partitionedhorizontally into two and vertically into two to be partitioned intofour sub-blocks.

Prediction processing is performed for each of these prediction blocks(sub-blocks). Hereinafter, the prediction block as a unit of predictionis also referred to as a prediction unit (PU).

A type of partition for the prediction tree is roughly classified intotwo for a case of the intra prediction and a case of the interprediction. The intra prediction is prediction within an identicalpicture, and the inter prediction is prediction processing performedbetween pictures different from each other (e.g., between display times,between layer images).

In the case of the intra prediction, a partition method includes methodsusing 2N×2N (the same size as the coding unit) and N×N.

In the case of the inter prediction, a partition method includes codingin a PU partition mode (part_mode) in the coded data. The partitioningincludes types of 2N×2N (the same size as the coding unit), 2N×N, 2N×nU,2N×nD, N×2N, nL×2N, nR×2N, and N×N. Note that 2N×nU indicates that a2N×2N coding unit are partitioned into two areas, 2N×0.5N and 2N×1.5N,in this order from the upside. 2N×nD indicates that a 2N×2N coding unitis partitioned into two areas, 2N×1.5N and 2N×0.5N, in this order fromthe upside. nL×2N indicates that a 2N×2N coding unit is partitioned intotwo areas, 0.5N×2N and 1.5N×2N, in this order from the left. nR×2Nindicates that a 2N×2N coding unit is partitioned into two areas,1.5N×2N and 0.5N×1.5N, in this order from the left. The number ofpartitions is any of 1, 2, or 4, and thus, the number of PUs included inthe CU is 1 to 4. These PUs are expressed as PU0, PU1, PU2, and PU3 inthis order.

Each of FIGS. 2A to 2H specifically illustrates a boundary location ofPU partitioning in the CU for each partition type.

FIG. 2A illustrates a PU partition mode for 2N×2N in which the CU is notpartitioned.

FIGS. 2B to 2D illustrate respectively partition shapes in cases thatthe PU partition modes are 2N×N, 2N×nU, and 2N×nD. Hereinafter, thepartitions in the cases that the PU partition modes are 2N×N, 2N×nU, and2N×nD are collectively referred to as a horizontally-long partition.

FIGS. 2E to 2G illustrate respectively partition shapes in the casesthat the PU partition modes are N×2N, nL×2N, and nR×2N. Hereinafter, thepartitions in the case that the PU partition types are N×2N, nL×2N, andnR×2N are collectively referred to as a vertically-long partition.

The horizontally-long partition and the vertically-long partition arecollectively referred to as a rectangular partition.

FIG. 2H illustrates a partition shape in a case that the PU partitionmode is N×N. The PU partition modes in FIGS. 2A and 2H are also referredto as square partitioning based on their partition shapes. The PUpartition modes in of FIGS. 2B and 2G are also referred to as non-squarepartitioning.

In FIGS. 2A to 2H, the number assigned to each area indicates anidentification number of the area, and the areas are processed in anorder of the identification number. To be more specific, theidentification number represents a scan order for partitioning.

In FIGS. 2A to 2H, an upper left corner is assumed to be a base point(origin) of the CU.

In the transform tree, the coding unit is partitioned into one ormultiple transform blocks, and a location and size of each transformblock is specified. In other words, the transform block/blocks is/areone or multiple non-overlapping areas which constitute the coding unit.The transform tree includes one or multiple transform blocks which areobtained by the above partitioning.

Partitioning in the transform tree includes that performed by allocatingan area having the same size as the coding unit as a transform block,and that performed by the recursive quadtree partitioning similar to thepartitioning of the tree block described above.

Transform processing is performed for each of these transform blocks.Hereinafter, the transform block as a unit of transform is also referredto as a transform unit (TU).

Prediction Parameter

A prediction image in a prediction unit is derived according to aprediction parameter associated with the prediction unit. The predictionparameter includes a prediction parameter for intra prediction or aprediction parameter for inter prediction. Hereinafter, the predictionparameter for inter prediction (inter-prediction parameter) isdescribed. The inter-prediction parameter includes prediction listutilization flags predFlagL0 and predFlagL1, reference picture indicesrefIdxL0 and refIdxL1, and vectors mvL0 and mvL1. The prediction listutilization flags predFlagL0 and predFlagL1 are flags respectivelyindicating whether reference picture lists called L0 list and L1 listare used, and in a case that a value of each thereof is 1, thecorresponding reference picture list is used. Here, assume that in acase that an expression “a flag indicating whether XX” is used herein,“1” corresponds to a case of XX and “0” corresponds to a case of not XX,and “1” represents true and “0” represents false in logical NOT, logicalAND, or the like (the same applies hereinafter). However, other valuesmay be used as a true value or a false value in actual device ormethods. A case that two reference picture lists are used, that is, acase of predFlagL0=1 and predFlagL1=1, corresponds to bi-prediction. Acase that one reference picture list is used, that is, a case of(predFlagL0, predFlagL1)=(1, 0) or (predFlagL0, predFlagL1)=(0, 1),corresponds to uni-prediction. Information on the prediction listutilization flag can be expressed by an inter-prediction flaginter_pred_idc described below. In general, a prediction imagegeneration unit (prediction image generation device) 308 and predictionparameter memory 307 which are described below use the prediction listutilization flag. In a case that information concerning which referencepicture list is used or not used is decoded from the coded data, theinter-prediction flag inter_pred_idc is used.

Examples of a syntax element for deriving the inter-prediction parameterincluded in the coded data include a partition mode part_mode, a mergeflag merge_flag, a merge index merge_idx, an inter-prediction flaginter_pred_idc, a reference picture index refIdxLX, a prediction vectorindex mvp_LX_idx, and a difference vector mvdLX, for example.

Example of Reference Picture List

Next, a description is given of an example of the reference picturelist. The reference picture list is a row constituted by the referencepictures stored in a reference picture memory 306 (FIG. 5 ). FIG. 3 is aconceptual diagram illustrating an example of the reference picturelist. In a reference picture list 601, each of five rectangleshorizontally aligned represents a reference picture. Signs P1, P2, Q0,P3, and P4 indicated from a left end to the right are signs representingcorresponding reference pictures. The character “P” of P1 or the likerepresents a viewpoint P, and the character “Q” of Q0 represents aviewpoint Q different from the viewpoint P. A suffix of P or Q indicatesa picture order count POC. A downward arrow immediately under “refIdxLX”represents that the reference picture index refIdxLX is an index forreferring to a reference picture Q0 in the reference picture memory 306.

Example of Reference Pictures

Next, a description is given of an example of the reference pictureswhich is used to derive a vector. FIG. 4 is a conceptual diagramillustrating an example of the reference pictures. In FIG. 4 , ahorizontal axis represents a display time and a vertical axis representsa viewpoint. Two rows and three columns of rectangles (six in total)illustrated in FIG. 4 represent pictures. The rectangle on a lower rowand the second column from the left among six rectangles represents adecoding target picture (target picture) and the other five rectanglesrepresent the reference pictures. The reference picture Q0 indicated byan upward arrow from the target picture is a picture the same as thetarget picture in a display time but different in a viewpoint. Thereference picture Q0 is used in displacement prediction in which thetarget picture is used as a reference. The reference picture P1indicated by a leftward arrow from target picture is the same as thetarget picture in a viewpoint and is a previous picture. The referencepicture P2 indicated by a rightward arrow from the target picture is thesame as the target picture in a viewpoint and is a future picture. Thereference picture P1 or P2 is used in motion prediction in which thetarget picture is used as a reference.

Inter-prediction Flag and Prediction List Utilization Flag

A relationship between the inter-prediction flag and the prediction listutilization flags predFlagL0 and predFlagL1 is mutually convertible asbelow. Therefore, the prediction list utilization flag may be used asthe inter-prediction parameter, or inter-prediction flag may be usedinstead. In the following description, in determination using theprediction list utilization flag, the inter-prediction flag may bealternatively used. In contrast, in determination using theinter-prediction flag, the prediction list utilization flag may bealternatively used.Inter-prediction flag=(predFlagL1<<1)+predFlagL0predFlagL0=inter-prediction flag & 1predFlagL1=inter-prediction flag>>1

where “>>” represents right shift and “<<” represents left shift.

Merge Prediction and AMVP Prediction

A prediction parameter decoding (coding) method includes a mergeprediction (merge) mode and an Adaptive Motion Vector Prediction (AMVP)mode. A merge flag merge_flag is a flag identifying these modes. In boththe merge prediction mode and the AMVP mode, a prediction parameter foran already processed block is used to derive a prediction parameter fora target PU. The merge prediction mode is a mode in which a predictionlist utilization flag predFlagLX (or inter-prediction flaginter_pred_idc), a reference picture index refIdxLX, and a motion vectormvLX are not included in the coded data, and the prediction parameteralready derived for a neighboring PU is used as it is. The AMVP mode isa mode in which the inter-prediction flag inter_pred_idc, the referencepicture index refIdxLX, and the motion vector mvLX are included in thecoded data. The motion vector mvLX is coded as a prediction vector indexmvp_LX_idx identifying the prediction vector mvpLX and as a differencevector mvdLX.

The inter-prediction flag inter_pred_idc is data indicating types andthe number of the reference pictures, and has a value Pred_L0, Pred_L1,or Pred_Bi. Pred_L0 and Pred_L1 indicate that the reference picturesstored in the reference picture lists called L0 list and L1 list,respectively, are used, and indicate that one reference picture is used(uni-prediction). The predictions using L0 list and L1 list are calledL0 prediction and L1 prediction, respectively. Pred_Bi indicates thattwo reference pictures are used (bi-prediction), and indicates that tworeference pictures stored in L0 list and L1 list are used. Theprediction vector index mvp_LX_idx is an index indicating a predictionvector, and the reference picture index refIdxLX is an index indicatinga reference picture stored in the reference picture list. “LX” is adescription method used in a case that the L0 prediction and the L1prediction are not distinguished from each other, and a parameter for L0list and a parameter for L1 list are distinguished by replacing “LX”with “L0” or “L1”. For example, refIdxL0 is a reference picture indexused for the L0 prediction, refIdxL1 is a reference picture index usedfor the L1 prediction, and refIdx (refIdxLX) is an expression used in acase that refIdxL0 and refIdxL1 are not distinguished from each other.

The merge index merge_idx is an index indicating whether any predictionparameter is used as a prediction parameter for the decoding targetblock, among prediction parameter candidates (merge candidate) derivedfrom the block on which the processing is completed.

The “target block” may be a prediction block higher by one hierarchythan multiple prediction blocks, or may be a coded unit including themultiple prediction blocks.

Motion Vector and Displacement Vector

The motion vector mvLX can be also separated into a motion vector in anarrow sense (narrow-sense motion vector) indicating a displacementamount between the blocks on two pictures which are different in times,and a displacement vector (disparity vector, parallax vector) indicatinga displacement amount between two blocks which are the same in a time.In the following description, the motion vector and the displacementvector are not distinguished from each other, and merely referred to asthe motion vector mvLX. The prediction vector and difference vector forthe motion vector mvLX are called respectively a prediction vector mvpLXand a difference vector mvdLX. Whether the motion vector mvLX or thedifference vector mvdLX is a motion vector or a displacement vector isidentified using the reference picture index refIdxLX associated withthe vector.

Configuration of Image Decoding Device

Next, a description is given of a configuration of an image decodingdevice 31 according to the present embodiment. FIG. 5 is a schematicdiagram illustrating the configuration of the image decoding device 31according to the present embodiment. The image decoding device 31 isconfigured to include an entropy decoding unit 301, a predictionparameter decoding unit (prediction image generation device) 302, areference picture memory (reference image storage unit, frame memory)306, a prediction parameter memory (prediction parameter storage unit,frame memory) 307, a prediction image generation unit 308, adequantization and inverse DCT unit 311, and an addition unit 312 and aresidual storing unit 313 (residual recording unit).

The prediction parameter decoding unit 302 is configured to include aninter-prediction parameter decoding unit (motion vector derivation unit)303 and an intra-prediction parameter decoding unit 304. The predictionimage generation unit 308 is configured to include an inter-predictionimage generation unit 309 and an intra-prediction image generation unit310.

The entropy decoding unit 301 performs entropy decoding on the codedstream Te input from outside to demultiplex and decode individual codes(syntax elements). Examples of the demultiplexed codes include theprediction information for generating the prediction image and residualinformation for generating the difference image.

The entropy decoding unit 301 outputs some of the demultiplexed codes tothe prediction parameter decoding unit 302. Some of the demultiplexedcodes are, for example, a prediction mode PredMode, partition modepart_mode, merge flag merge_flag, merge index merge_idx,inter-prediction flag inter_pred_idc, reference picture index refIdxLX,prediction vector index mvp_LX_idx, and difference vector mvdLX. Controlon which code is to be decoded is based on an instruction from theprediction parameter decoding unit 302. The entropy decoding unit 301outputs quantized coefficients to the dequantization and inverse DCTunit 311. The quantized coefficients are coefficients obtained byperforming Discrete Cosine Transform (DCT) on the residual signal andquantization in the coding processing.

The inter-prediction parameter decoding unit 303 refers to theprediction parameter stored in the prediction parameter memory 307,based on the code input from the entropy decoding unit 301 to decode theinter-prediction parameter.

The inter-prediction parameter decoding unit 303 outputs the decodedinter-prediction parameter to the prediction image generation unit 308and stores the parameter in the prediction parameter memory 307. Theinter-prediction parameter decoding unit 303 is described in detaillater.

The intra-prediction parameter decoding unit 304 refers to theprediction parameter stored in the prediction parameter memory 307,based on the code input from the entropy decoding unit 301 to decode theintra-prediction parameter. The intra-prediction parameter is aparameter used for processing to predict the picture block within onepicture, for example, an intra-prediction mode IntraPredMode. Theintra-prediction parameter decoding unit 304 outputs the decodedintra-prediction parameter to the prediction image generation unit 308and stores the parameter in the prediction parameter memory 307.

The intra-prediction parameter decoding unit 304 may derive anintra-prediction mode different in luminance and color difference. Inthis case, the intra-prediction parameter decoding unit 304 decodes aluminance prediction mode IntraPredModeY as a prediction parameter forluminance, and a color difference prediction mode IntraPredModeC as aprediction parameter for color difference. The luminance prediction modeIntraPredModeY includes 35 modes, which correspond to planar prediction(0), DC prediction (1), and angular predictions (2 to 34). The colordifference prediction mode IntraPredModeC uses any of the planarprediction (0), the DC prediction (1), the angular predictions (2 to34), and LM mode (35). The intra-prediction parameter decoding unit 304decodes a flag indicating whether IntraPredModeC is the same mode as theluminance mode, and may assign IntraPredModeC equal to IntraPredModeY ina case that the flag indicates the same mode as the luminance mode. Theintra-prediction parameter decoding unit 304 may decode the planarprediction (0), the DC prediction (1), the angular predictions (2 to34), and the LM mode (35) as IntraPredModeC in a case that the flagindicates a mode different from the luminance mode.

The reference picture memory 306 stores a block (reference pictureblock) of the reference pictures generated by the addition unit 312 in apredefined location for each decoding target picture and block.

The prediction parameter memory 307 stores the prediction parameters ina predefined location for each decoding target picture and block. To bemore specific, the prediction parameter memory 307 stores theinter-prediction parameter decoded by the inter-prediction parameterdecoding unit 303, the intra-prediction parameter decoded by theintra-prediction parameter decoding unit 304, and the prediction modepredMode demultiplexed by the entropy decoding unit 301. Examples of thestored inter-prediction parameter include the prediction listutilization flag predFlagLX (inter-prediction flag inter_pred_idc), thereference picture index refIdxLX, and the motion vector mvLX.

Input to the prediction image generation unit 308 are the predictionmode predMode which is input from the entropy decoding unit 301 and theprediction parameters from the prediction parameter decoding unit 302.The prediction image generation unit 308 reads out the reference picturefrom the reference picture memory 306. The prediction image generationunit 308 uses the input prediction parameters and the read out referencepicture to generate a prediction picture block P (prediction image) inthe prediction mode indicated by the prediction mode predMode.

Here, in a case that the prediction mode predMode indicates theinter-prediction mode, the inter-prediction image generation unit 309uses the inter-prediction parameter input from the inter-predictionparameter decoding unit 303 and the read out reference picture togenerate prediction picture block P by the inter-prediction. Theprediction picture block P corresponds to the prediction unit PU. The PUcorresponds to a part of a picture configured with multiple pixels as aunit for the prediction processing, that is, a decoding target block onwhich the prediction processing is performed in one time, as describedabove.

The inter-prediction image generation unit 309 reads out from thereference picture memory 306 a reference picture block at a locationwhich is indicated by the motion vector mvLX with reference to thedecoding target block from the reference picture indicated by thereference picture index refIdxLX with respect to the reference picturelist having the prediction list utilization flag predFlagLX of 1 (L0list or L1 list). The inter-prediction image generation unit 309performs prediction on the read out reference picture block to generatethe prediction picture block P. The inter-prediction image generationunit 309 outputs the generated prediction picture block P to theaddition unit 312.

In a case that the prediction mode predMode indicates theintra-prediction mode, the intra-prediction image generation unit 310uses the intra-prediction parameter input from the intra-predictionparameter decoding unit 304 and the read out reference picture toperform the intra-prediction. To be more specific, the intra-predictionimage generation unit 310 reads out from the reference picture memory306 the reference picture block in a predefined range from the decodingtarget block in the already decoded blocks of the decoding targetpicture. The predefined range is, for example, any of left, upper left,upper, and upper right neighboring blocks in a case that the decodingtarget block sequentially moves in an order of a so-called raster scan,and depends on the intra-prediction mode. The order of the raster scanis an order of sequentially moving from a left end to a right end ofeach row from an upper end to a bottom end in each picture.

The intra-prediction image generation unit 310 performs prediction onthe read out reference picture block in the prediction mode indicated bythe intra-prediction mode IntraPredMode to generate the predictionpicture block. The intra-prediction image generation unit 310 outputsthe generated prediction picture block P to the addition unit 312.

In a case that the intra-prediction parameter decoding unit 304 derivesthe intra-prediction mode different in luminance and color difference,the intra-prediction image generation unit 310 generates a luminanceprediction picture block by any of the planar prediction (0), the DCprediction (1), and the angular predictions (2 to 34) depending on theluminance prediction mode IntraPredModeY. The intra-prediction imagegeneration unit 310 generates a color difference prediction pictureblock by any of the planar prediction (0), the DC prediction (1), theangular predictions (2 to 344), and the LM mode (35) depending on thecolor difference prediction mode IntraPredModeC.

The dequantization and inverse DCT unit 311 dequantizes the quantizedcoefficients input from the entropy decoding unit 301 to find DCTcoefficients. The dequantization and inverse DCT unit 311 performsInverse Discrete Cosine Transform (inverse DCT) on the found DCTcoefficients to compute a decoded residual signal. The dequantizationand inverse DCT unit 311 outputs the computed decoded residual signal tothe addition unit 312 and the residual storage unit 313.

The addition unit 312 adds the prediction picture blocks P input fromthe inter-prediction image generation unit 309 and intra-predictionimage generation unit 310 and a signal value of the decoded residualsignal input from the dequantization and inverse DCT unit 311 for eachpixel to generate a reference picture block. The addition unit 312stores the generated reference picture block in the reference picturememory 306, and outputs, to outside, a decoded layer image Td in whichthe generated reference picture blocks are integrated for each picture.

Configuration of Inter-prediction Parameter Decoding Unit

Next, a description is given of a configuration of the inter-predictionparameter decoding unit 303.

FIG. 6 is a schematic diagram illustrating a configuration of theinter-prediction parameter decoding unit 303 according to the presentembodiment. The inter-prediction parameter decoding unit 303 isconfigured to include an inter-prediction parameter decoding controlunit (motion vector derivation unit) 3031, an AMVP prediction parameterderivation unit 3032, an addition unit 3035, and a merge predictionparameter derivation unit 3036.

The inter-prediction parameter decoding control unit 3031 instructs theentropy decoding unit 301 to decode the code (syntax element) associatedwith the inter-prediction to extract the code (syntax element) includedin the coded data, for example, the partition mode part_mode, the mergeflag merge_flag, the merge index merge_idx, the inter-prediction flaginter_pred_idc, the reference picture index refIdxLX, the predictionvector index mvp_LX_idx, and the difference vector mvdLX.

The inter-prediction parameter decoding control unit 3031 first extractsthe merge flag. An expression that the inter-prediction parameterdecoding control unit 3031 extracts a certain syntax element meansinstructing the entropy decoding unit 301 to decode a code of a certainsyntax element to read the syntax element from the coded data. Here, ina case that the merge flag indicates a value of 1, that is, the mergeprediction mode, the inter-prediction parameter decoding control unit3031 extracts the merge index merge_idx as a prediction parameterrelated to the merge prediction. The inter-prediction parameter decodingcontrol unit 3031 outputs the extracted merge index merge_idx to themerge prediction parameter derivation unit 3036.

In a case that the merge flag merge_flag is 0, that is, indicates theAMVP prediction mode, the inter-prediction parameter decoding controlunit 3031 uses the entropy decoding unit 301 to extract the AMVPprediction parameter from the coded data. Examples of the AMVPprediction parameter include the inter-prediction flag inter_pred_idc,the reference picture index refIdxLX, the prediction vector indexmvp_LX_idx, and the difference vector mvdLX. The inter-predictionparameter decoding control unit 3031 outputs the prediction listutilization flag predFlagLX derived from the extracted inter-predictionflag inter_pred_idc and the reference picture index refIdxLX to the AMVPprediction parameter derivation unit 3032 and the prediction imagegeneration unit 308 (FIG. 5 ), and stores the predFlagLX and refIdxLX inthe prediction parameter memory 307 (FIG. 5 ). The inter-predictionparameter decoding control unit 3031 outputs the extracted predictionvector index mvp_LX_idx to the AMVP prediction parameter derivation unit3032. The inter-prediction parameter decoding control unit 3031 outputsthe extracted difference vector mvdLX to the addition unit 3035.

FIG. 7 is a schematic diagram illustrating a configuration of the mergeprediction parameter derivation unit 3036 according to the presentembodiment. The merge prediction parameter derivation unit 3036 includesa merge candidate derivation unit 30361 (prediction vector compute unit)and a merge candidate selection unit 30362. The merge candidate storageunit 303611 stores therein merge candidates input from the mergecandidate derivation unit 30361. The merge candidate is configured toinclude the prediction list utilization flag predFlagLX, the motionvector mvLX, and the reference picture index refIdxLX. The mergecandidate stored in the merge candidate storage unit 303611 is assignedwith an index according to a prescribed rule.

The merge candidate derivation unit 30361 uses, without change, a motionvector and reference picture index refIdxLX of a neighboring block onwhich the decode processing has been already applied to derive the mergecandidates. Affine prediction may be used as another way to derive themerge candidates. This method is described below in detail. The mergecandidate derivation unit 30361 may use the affine prediction forspatial merge candidate derivation processing, temporal merging(inter-frame merge) candidate derivation processing, combined mergecandidate derivation processing, and zero merge candidate derivationprocessing which are described below. The affine prediction is performedin units of sub-blocks, and the prediction parameter is stored in theprediction parameter memory 307 for each sub-block. Alternatively, theaffine prediction may be performed in units of pixels.

Spatial Merge Candidate Derivation Processing

In the spatial merge candidate derivation processing, the mergecandidate derivation unit 30361 reads out the prediction parameters(prediction list utilization flag predFlagLX, motion vector mvLX,reference picture index refIdxLX) stored by the prediction parametermemory 307 according to a prescribed rule to derive the read outprediction parameters as merge candidates. The read out predictionparameters are prediction parameters related to each of blocks in apredefined range from the decoding target block (e.g., all or some ofblocks in contact with a lower left end, upper left end, and upper rightend of the decoding target block). The merge candidates derived by themerge candidate derivation unit 30361 are stored in the merge candidatestorage unit 303611.

Temporal Merge Candidate Derivation Processing

In the temporal merging derivation processing, the merge candidatederivation unit 30361 reads out, as merge candidates, predictionparameters for a block in a reference image including coordinates on thelower right of the decoding target block from the prediction parametermemory 307. As a method of specifying the reference image, the referencepicture index refIdxLX specified in the slice header may be used, or aminimum one of the reference picture indices refIdxLX of the blockneighboring to the decoding target block may be used, for example. Themerge candidates derived by the merge candidate derivation unit 30361are stored in the merge candidate storage unit 303611.

Combined Merge Candidate Derivation Processing

In the combined merging derivation processing, the merge candidatederivation unit 30361 uses vectors and reference picture indices of twodifferent derived merge candidates which are already derived and storedin the merge candidate storage unit 303611 as vectors for L0 and L1,respectively, to combine, and thus derives a combined merge candidate.The merge candidate derived by the merge candidate derivation unit 30361is stored in the merge candidate storage unit 303611.

Zero Merge Candidate Derivation Processing

In the zero merge candidate derivation processing, the merge candidatederivation unit 30361 derives a merge candidate including a referencepicture index refIdxLX of 0 and both an X component and Y component of 0of a motion vector mvLX. The merge candidate derived by the mergecandidate derivation unit 30361 is stored in the merge candidate storageunit 303611.

The merge candidate selection unit 30362 selects, as an inter-predictionparameter for the target PU, a merge candidate assigned with an indexcorresponding to the merge index merge_idx input from theinter-prediction parameter decoding control unit 3031, among the mergecandidates stored in the merge candidate storage unit 303611. The mergecandidate selection unit 30362 stores the selected merge candidate inthe prediction parameter memory 307 and outputs the candidate to theprediction image generation unit 308 (FIG. 5 ).

FIG. 8 is a schematic diagram illustrating a configuration of the AMVPprediction parameter derivation unit 3032 according to the presentembodiment. The AMVP prediction parameter derivation unit 3032 includesa vector candidate derivation unit 3033 (vector compute unit) and avector candidate selection unit 3034. The vector candidate derivationunit 3033 reads out the vector (motion vector or displacement vector)stored in the prediction parameter memory 307 as a prediction vectormvpLX, based on the reference picture index refIdx. The read out vectoris a vector related to each of blocks in a predefined range from thedecoding target block (e.g., all or some of blocks in contact with alower left end, upper left end, and upper right end of the decodingtarget block).

The vector candidate selection unit 3034 selects, as a prediction vectormvpLX, a vector candidate indicated by the prediction vector indexmvp_LX_idx input from the inter-prediction parameter decoding controlunit 3031, among the vector candidates read out by the vector candidatederivation unit 3033. The vector candidate selection unit 3034 outputsthe selected prediction vector mvpLX to the addition unit 3035.

The vector candidate selection unit 3034 may perform round processingwhich are described below on the selected prediction vector mvpLX.

A vector candidate storage unit 30331 stores therein the vectorcandidate input from the vector candidate derivation unit 3033. Thevector candidates are configured to include the prediction vector mvpLX.The vector candidates stored in the vector candidate storage unit 30331is assigned with an index according to a prescribed rule.

The vector candidate derivation unit 3033 uses the affine prediction toderive the vector candidates. The vector candidate derivation unit 3033may use the affine prediction for spatial vector candidate derivationprocessing, temporal vector (inter-frame vector) candidate derivationprocessing, combined vector candidate derivation processing, and zerovector candidate derivation processing which are described below. Theaffine prediction is performed in units of sub-blocks, and theprediction parameter is stored in the prediction parameter memory 307for each sub-block. Alternatively, the affine prediction may beperformed in units of pixels.

FIG. 9 is a conceptual diagram illustrating an example of the vectorcandidates. A prediction vector list 602 illustrated in FIG. 9 is a listconstituted by multiple vector candidates derived by the vectorcandidate derivation unit 3033. In the prediction vector list 602, eachof five rectangles horizontally aligned represents a region indicating aprediction vector. A downward arrow immediately under “mvp_LX_idx”located at the second rectangle from the left end, and mvpLX under thearrow indicate that the prediction vector index mvp_LX_idx is an indexreferring to the vector mvpLX in the prediction parameter memory 307.

The vector candidates are generated based on vectors related to blocksreferred to by the vector candidate selection unit 3034. Each blockreferred to by the vector candidate selection unit 3034 may be a blockon which the decode processing is completed, the block being in apredefined range from the decoding target block (e.g., neighboringblock). The neighboring block includes a block spatially neighboring tothe decoding target block such as a left block and an upper block, and ablock temporally neighboring to the decoding target block such a blockwhich is the same in a location as the decoding target block butdifferent in a display time.

The addition unit 3035 adds the prediction vector mvpLX input from theAMVP prediction parameter derivation unit 3032 and the difference vectormvdLX input from the inter-prediction parameter decoding control unit3031 to compute a motion vector mvLX. The addition unit 3035 outputs thecomputed motion vector mvLX to the prediction image generation unit 308(FIG. 5 ).

FIG. 10 is a schematic diagram illustrating a configuration of theinter-prediction parameter decoding control unit 3031 according to thepresent embodiment. The inter-prediction parameter decoding control unit3031 is configured to include an addition prediction flag decoding unit30311, a merge index decoding unit 30312, a vector candidate indexdecoding unit 30313, and a not illustrated partition mode decoding unit,merge flag decoding unit, inter-prediction flag decoding unit, referencepicture index decoding unit, vector difference decoding unit, and thelike. The partition mode decoding unit, the merge flag decoding unit,the merge index decoding unit, the inter-prediction flag decoding unit,the reference picture index decoding unit, the vector candidate indexdecoding unit 30313, and the vector difference decoding unit decoderespectively the partition mode part_mode, the merge flag merge_flag,the merge index merge_idx, the inter-prediction flag inter_pred_idc, thereference picture index refIdxLX, the prediction vector indexmvp_LX_idx, and the difference vector mvdLX.

Inter-Prediction Image Generation Unit 309

FIG. 11 is a schematic diagram illustrating a configuration of theinter-prediction image generation unit 309 according to the presentembodiment. The inter-prediction image generation unit 309 is configuredto include a motion compensation unit 3091 and a weighted predictionunit 3094.

Motion Compensation

The motion compensation unit 3091 reads out from the reference picturememory 306 a block which is displaced by a motion vector mvLX from astarting point as a location of the decoding target block for thereference picture specified by the reference picture index refIdxLX,based on the prediction list utilization flag predFlagLX, referencepicture index refIdxLX, and motion vector mvLX that are input from theinter-prediction parameter decoding unit 303 to generate a motioncompensation image. Here, in a case that the accuracy of the motionvector mvLX is not integer accuracy, a motion compensation image isgenerated by filtering called a motion compensation filter forgenerating a pixel at fractional position. Hereinafter, an L0 predictionmotion compensation image is called predSamplesL0 and an L1 predictionmotion compensation image is called predSamplesL1. These images arecalled predSamplesLX when not distinguished.

Weighted Prediction

The weighted prediction unit 3094 multiplies an input motion disparityimage predSamplesLX by weight coefficients to generate a predictionpicture block P (prediction image). The input motion disparity imagepredSamplesLX in the case of the residual prediction is an image onwhich the residual prediction is applied. In a case that one ofreference list utilization flags (predFlagL0 or predFlagL1) is 1 (thatis, in a case of the uni-prediction) and the weighted prediction is notused, processing by the following equation is performed to conform theinput motion disparity image predSamplesLX (LX is L0 or L1) to thenumber of pixel bits.predSamples[x][y]=Clip3(0,(1<<bitDepth)−1,(predSamplesLX[x][y]+offset1>>shift1)where shift1=14−bitDepth,offset1=1<<(shift1-1).

In a case that both of the reference list utilization flags (predFlagL0or predFlagL1) are 1 (that is, in a case of the bi-prediction) and theweighted prediction is not used, processing by the following equation isperformed to average the input motion disparity images predSamplesL0 andpredSamplesL1 to be conformed to the number of pixel bits.predSamples[x][y]=Clip3(0,(1<<bitDepth)−1,(predSamplesL0[x][y]+predSamplesL1[x][y]offset2)>>shift2)where shift2=15−bitDepth,offset2=1<<(shift2-1).

Furthermore, in a case of the uni-prediction and that the weightedprediction is performed, the weighted prediction unit 3094 derives aweighted prediction coefficient w0 and an offset o0 from the coded dataand performs processing by the following equation.predSamples[x][y]=Clip3(0,(1<<bitDepth)−1,((predSamplesLX[x][y]*w0+2 log2WD−1)>>log 2WD)+o0)

where log 2WD represents a variable indicating a prescribed shiftamount.

Further, in a case of the bi-prediction and that the weighted predictionis performed, the weighted prediction unit 3094 derives weightedprediction coefficients w0, w1, o0, and o1 from the coded data andperforms processing by the following equation.predSamples[x][y]Clip3(0,(1<<bitDepth)−1,(predSamplesL0[x][y]*w0+predSamplesL1[x][y]*w1+((o0+o1+1)<<log2WD))>>(log 2WD+1))Motion Vector Decoding Processing

Hereinafter, motion vector decoding processing according to the presentembodiment will be specifically described with reference to FIGS. 15 to27 .

As clearly seen from the above-mentioned description, the motion vectordecoding processing according to the present embodiment includesprocessing of decoding a syntax element related to an inter prediction(also referred to as motion syntax decoding processing) and processingof deriving a motion vector (motion vector derivation processing).

Motion Syntax Decoding Processing

FIG. 15 is a flowchart illustrating a flow of inter-prediction syntaxdecoding processing performed by the inter-prediction parameter decodingcontrol unit 3031. In the following description of FIG. 15 , each stepis performed by the inter-prediction parameter decoding control unit3031 unless explicitly described otherwise.

First, a merge flag merge_flag is decoded in Step S101, and merge_flag!=0? is determined in Step S102.

In a case that merge_flag !=0 is true (Y in S102), a merge indexmerge_idx is decoded in S103, and the processing proceeds to motionvector derivation processing (S201) (FIG. 18A) in a merge mode.

In a case that merge_flag !=0 is false (N in S102), an inter-predictionflag inter_pred_idc is decoded in S104, a reference picture indexrefIdxL0 is decoded in S105, a syntax mvdL0 of a difference vector isdecoded in S106, and a prediction vector index mvp_L0_idx is decoded inS107.

A reference picture index refIdxL1 is decoded in S108, a syntax mvdL1 ofa difference vector is decoded in S109, a prediction vector indexmvp_L1_idx is decoded in S110, and the processing proceeds to motionvector derivation processing (S301) (FIG. 18B) in an AMVP mode.

Note that, in a case that the inter-prediction flag inter_pred_idc is 0,that is, in a case that the inter-prediction flag inter_pred_idcindicates a L0 prediction (PRED_L0), the processing in S108 to S110 isunnecessary. On the other hand, in a case that the inter-prediction flaginter_pred_idc is 1, that is, in a case that the inter-prediction flaginter_pred_idc indicates a L1 prediction (PRED_L1), the processing inS105 to S107 is unnecessary. Further, in a case that theinter-prediction flag inter_pred_idc is 2, that is, in a case that theinter-prediction flag inter_pred_idc indicates a bi-prediction (PRED_B),each step of S105 to S110 is performed.

Difference Vector Decoding Processing

FIG. 16 is a flowchart more specifically illustrating the differencevector decoding processing in Steps S106 and S109 mentioned above. Themotion vector and the difference vector mvdLX are respectivelyrepresented by mvLX and mvdLX so far without distinguishing between ahorizontal component and a vertical component thereof. Now, thehorizontal component and the vertical component are respectivelyexpressed by using [0] and [1] to clarify that syntaxes of thehorizontal component and the vertical component are needed andprocessing for the horizontal component and the vertical component isneeded.

As illustrated in FIG. 16 , first, in Step S10611, a syntax mvdAbsVal[0]indicating a horizontal motion vector difference absolute value isdecoded from coded data. In Step S10612, whether the (horizontal) motionvector difference absolute value is 0mvdAbsVal[0]!=0is determined.

In a case that the horizontal motion vector difference absolute valuemvdAbsVal[0] !=0 is true (Y in S10612), a syntax mv_sign_flag[0]indicating a sign (positive and negative) of the horizontal motionvector difference is decoded from the coded data in S10614, and theprocessing proceeds to S10615. On the other hand, in a case thatmvdAbsVal[0] !=0 is false (N in S10612), mv_sign_flag[0] is set(inferred) to 0 in S10613, and the processing proceeds to S10615.

Subsequently, in Step S10615, a syntax mvdAbsVal[1] indicating avertical motion vector difference absolute value is decoded. In StepS10612, whether the (vertical) motion vector difference absolute valueis 0mvdAbsVal[1]!=0is determined.

In a case that mvdAbsVal[1] !=0 is true (Y in S10616), a syntaxmy_sign_flag[1] indicating a sign (positive and negative) of thevertical motion vector difference is decoded from the coded data inS10618. On the other hand, in a case that mvdAbsVal[1] !=0 is false (Nin S10616), the syntax mv_sign_flag[1] indicating the sign (positive andnegative) of the vertical motion vector difference is set to 0 inS10617.

As described above, each of the motion vector difference absolute valuemvdAbsVal and a code mvd_sign_flag of the motion vector difference areexpressed by a vector including {horizontal component, verticalcomponent}, and the horizontal component and the vertical component arerespectively accessed by [0] and [1]. As another access method, forexample, the vertical component and the horizontal component may berespectively accessed by [0] and [1]. The vertical component isprocessed after the horizontal component, but the order of processing isnot limited to this. For example, the vertical component may beprocessed before the horizontal component (the same applieshereinafter).

FIG. 17 is a flowchart illustrating an example of processing of decodinga difference vector in Steps S106 and S109 by a method different fromthe processing exemplified in FIG. 16 . The steps already described inFIG. 16 will be provided with the same reference numerals in FIG. 17 ,and description thereof will be omitted.

The example illustrated in FIG. 17 is different from FIG. 16 in that amotion vector accuracy flag mvd_dequant_flag is further decoded.

In other words, in the example illustrated in FIG. 17 , a variablenonZeroMV indicating whether the difference vector is 0 is derived, andwhether the difference vector is 0nonZeroMV!=0?is determined in S10629 after S10617 and S10618 already described.

Here, the variable nonZeroMV can be derived as follows.nonZeroMV=mvdAbsVal[0]+mvdAbsVal[1]

In a case that nonZeroMV !=0 is true (Y in S10629), that is, in a casethat the difference vector is other than 0, the motion vector accuracyflag mvd_dequant_flag is decoded from the coded data in S10630. Further,in a case that nonZeroMV !=0 is false (N in S10629), mvd_dequant_flag isnot decoded from the coded data and is set to 0. In other words, in acase that the difference vector is other than 0, that is, only in a casethat nonZeroMV !=0, mvd_dequant_flag is decoded.

Note that the motion vector accuracy flag mvd_dequant_flag is used toswitch accuracy of a motion vector. Further, in a case that the flag isassumed to be a flag selecting whether accuracy of the motion vector isa full pel, the flag may be written (expressed) as integer_mv_flag.

Motion Vector Derivation Processing

Next, motion vector derivation processing will be described by usingFIGS. 18 to 27 .

FIGS. 18A and 18B are flowcharts illustrating a flow of motion vectorderivation processing performed by the inter-prediction parameterdecoding unit 303 according to the present embodiment.

Motion Vector Derivation Processing in Merge Prediction Mode

FIG. 18A is a flowchart illustrating a flow of motion vector derivationprocessing in a merge prediction mode. As illustrated in FIG. 18A, themerge candidate derivation unit 30361 derives a merge candidate listmergeCandList in S201. The merge candidate selection unit 30362 selectsa merge candidate mvLX designated by a merge index merge_idx, based onmergeCandList[merge_idx] in S202. For example, the merge candidate mvLXis derived from mvLX=mergeCandList[merge_idx].

Motion Vector Derivation Processing in AMVP Mode

In the AMVP mode, a difference motion vector mvdLX is derived fromdecoded syntaxes mvdAbsVal and mv_sign_flag, and a motion vector mvLX isderived by adding the difference motion vector mvdLX to a predictionvector mvpLX. In the description of the syntax, the horizontal componentand the vertical component are distinguished from each other by using[0] and [1] like mvdAbsVal[0] and mvdAbsVal[1], but the components arenot distinguished hereinafter for the sake of simplification and aresimply described as mvdAbsVal and the like. The motion vector actuallyincludes the horizontal component and the vertical component, so thatprocessing described without distinguishing components may be performedin order of components.

On the other hand, FIG. 18B is a flowchart illustrating a flow of themotion vector derivation processing in the AMVP mode. As illustrated inFIG. 18B, the vector candidate derivation unit 3033 derives a motionvector predictor list mvpListLX in S301. In S302, the vector candidateselection unit 3034 selects a motion vector candidate (predictionvector, prediction motion vector) mvpLX=mvpListLX[mvp_LX_idx] designatedby a prediction vector index mvp_LX_idx.

Next, in S303, the inter-prediction parameter decoding control unit 3031derives a difference vector mvdLX. As illustrated in S304 in FIG. 18B,the vector candidate selection unit 3034 may perform round processing onthe selected prediction vector. Next, in S305, the addition unit 3035adds the prediction vector mvpLX and the difference vector mvdLX tocalculate a motion vector mvLX. In other words, mvLX is calculated frommvLX=mvpLX+mvdLX.Difference Vector Derivation Processing

Next, motion vector derivation processing will be described using FIG.19 . FIG. 19 is a flowchart more specifically illustrating thedifference vector derivation processing in Step S303 mentioned above.The difference vector derivation processing includes two processingdescribed below. Dequantization processing (PS_DQMV): processing ofdequantizing a motion vector difference absolute value mvdAbsVal(quantization value) being a value decoded from the coded data and aquantized value, and deriving the motion vector difference absolutevalue mvdAbsVal with specific accuracy (for example, basic vectoraccuracy described below). Sign providing processing (PS_SIGN):processing of determining a code of the derived motion vector differenceabsolute value mvdAbsVal and deriving a motion vector difference mvdLX.

In the following description of FIG. 19 , each step is performed by theinter-prediction parameter decoding control unit 3031 unless explicitlydescribed otherwise.

As illustrated in FIG. 19 , a motion vector scale shiftS being aparameter that designates motion vector accuracy is derived in S3031,and whether the motion vector scale>0 is determined in S3032. In a casethat the motion vector scale>0 is true, that is, in a case that shiftS>0(Y in S3032), a difference vector is dequantized by, for example, bitshift processing by using shiftS in S3033. Here, more specifically, thebit shift processing is performed by, for example, processing(processing PS_DQMV0) of shifting a quantized motion vector differenceabsolute value mvdAbsVal by shiftS to the left:mvdAbsVal=mvdAbsVal<<shiftS  Equation (Scale)

Then, the code providing processing is performed on the differencevector in S3034, and the processing proceeds to S3041. Note that thesign providing processing (processing PS_SIGN) is performed bymvdLX=mvdAbsVal*(1−2*mv_sign_flag)  Equation (sign).In other words, the motion vector difference mvdLX is derived from themotion vector difference absolute value mvdAbsVal according to a valueof mv_sign_flag. Note that in a case that the motion vector scale>0 isfalse, that is, in a case that shiftS=0 (N in S3032), the processingproceeds to S3034 without passing through S3033. Note thatdequantization of a difference vector to which a shift at a value 0(shiftS=0) is applied does not affect a value of the difference vector.Thus, also in the case that the motion vector scale>0 is false, S3033may be performed after the motion vector scale is derived as 0(shiftS=0) without skipping S3033.

Further, a value of greater than or equal to 0 is generally used for themotion vector scale, and thus in a case that the motion vector scale isother than 0, the motion vector scale is always positive (>0). Thus,“motion vector scale !=0” may be used for determination instead ofdetermination of “motion vector scale>0”. Note that the same alsoapplies to other processing of determining “motion vector scale>0”herein.

Prediction Vector Round Processing

Next, prediction vector round processing (prediction motion vector roundprocessing) will be described using FIG. 20 . FIG. 20 is a flowchartmore specifically illustrating the prediction vector round processing inStep S304 mentioned above. In the following description of FIG. 20 ,each step is performed by the vector candidate selection unit 3034unless explicitly described otherwise. As illustrated in FIG. 20 , amotion vector scale is derived in S3041, and whether the motion vectorscale>0 is determined in S3042. In a case that the motion vector scale>0is true (Y in S3042), that is, in a case that a difference vector isdequantized by the motion vector scale, round processing (processingPS_PMVROUND) may be performed on a prediction motion vector mvpLX byround, which ismvpLX=round(mvpLX,shiftS),based on the motion vector scale in S3043. Here, the round(mvpLX,shiftS) represents a function that performs the round processing withshiftS on the prediction motion vector mvpLX. For example, the roundprocessing may set the prediction motion vector mvpLX to a value in1<<shiftS units (discrete value) by using equations (SHIFT-1) to(SHIFT-4) described below.

After S304, the processing proceeds to S305. In S305, a motion vectormvLX is derived from the prediction vector mvpLX and the differencevector mvdLX. Note that, in a case that the motion vector scale>0 isfalse (N in S3042), the processing proceeds to S305 without rounding theprediction motion vector mvpLX, and the motion vector mvLX is derived.

Motion Vector Scale Derivation Processing using Motion Vector AccuracyFlag

Next, motion vector scale derivation processing (PS_P0) using a motionvector accuracy flag will be described using FIG. 21 . FIG. 21 is aflowchart more specifically illustrating the motion vector scalederivation processing in Steps S3031 (see FIG. 19 ) and S3041 (see FIG.20 ) mentioned above. FIG. 21 specifically exemplifies the processing inS3041 for the sake of description, but the processing illustrated inFIG. 21 may be applied to S3031.

In the following description of FIG. 21 , each step is performed by theinter-prediction parameter decoding control unit 3031 unless explicitlydescribed otherwise.

As illustrated in FIG. 21 , whether the motion vector accuracy flagmvd_dequant_flag satisfies mvd_dequant_flag !=0 is determined inS304111. In a case thatmvd_dequant_flag !=0is true (Y in S304111), for example, in a case that mvd_dequant_flag=1,for example, shiftS is configured to be equal to motion vector basicaccuracy mvBaseAccu (>0) being a parameter indicating a reference of themotion vector accuracy in S304112, and the accuracy of the motion vectoris configured to be a full pel. Here, a value of mvBaseAccu is, forexample, 2. After S304112, the processing proceeds to S3042. In a casethat the motion vector accuracy flag mvd_dequant_flag !=0 is false (N inS304111), for example, in a case that mvd_dequant_flag=0, shiftS=0 isconfigured in S304113, and the processing proceeds to S3042. In thiscase, the accuracy of the motion vector is configured to be a ¼ pel.Note that, for example, shiftS may be configured to be motion vectorbasic accuracy mvBaseAccu−1, the motion vector basic accuracy mvBaseAccubeing the parameter indicating the reference of the motion vectoraccuracy in S304112. In this case, in a case that mvd_dequant_flag is 1(other than 0), the accuracy of the motion vector is configured to be ahalf pel.

Note that, in the configuration described above, the accuracy of themotion vector is reduced in the case that mvd_dequant_flag is 1, and theaccuracy of the motion vector is maintained in the case thatmvd_dequant_flag is 0. In another configuration, the motion vectoraccuracy may be reduced in a case that a value of mvd_dequant_flag is adifferent value, for example, 0, and the motion vector accuracy may bemaintained in the case that mvd_dequant_flag is 1. In other words, aflag indicated herein can be obtained by combining a numerical value ofthe flag and a content indicated by the flag.

In this way, according to the above-described configuration, accuracy ofa motion vector is switched by referring to a motion vector accuracyflag, and thus a motion vector having more appropriate accuracy can beused. On the other hand, the motion vector accuracy flag needs to beincluded in the coded data, and thus a code amount increases, and codingefficiency may not be improved as it is expected.

Hereinafter, an example of a configuration for using a motion vectorhaving appropriate accuracy while improving coding efficiency will bedescribed.

Motion Vector Scale Derivation Processing using Block Size of TargetBlock

FIG. 22 is used as an example of a configuration (derivation processingPS_P1A) for using a motion vector having appropriate accuracy whileimproving coding efficiency to describe motion vector scale derivationprocessing using a block size of a target block. FIG. 22 is a flowchartmore specifically illustrating the motion vector scale derivationprocessing in Steps S3031 (see FIG. 19 ) and S3041 (see FIG. 20 )mentioned above. FIG. 22 specifically exemplifies the processing inS3041 for the sake of description, but the processing illustrated inFIG. 22 may be applied to 3031.

In the following description of FIG. 22 , each step is performed by theinter-prediction parameter decoding control unit 3031 unless explicitlydescribed otherwise.

As illustrated in FIG. 22 , whether a block size blkW satisfiesblkW<TH (where TH is a prescribed threshold value)is determined in S304121. In a case that the block size blkW<TH is true(Y in S304121), that is, in a case that the block size blkW is smaller,shiftS=shiftMis configured in S304122, and the processing proceeds to S3042. Further,in a case that the block size blkW<TH is false (N in S304121), that is,in a case that the block size blkW is greater,shiftS=shiftNis configured in S304123, and the processing proceeds to S3042. Here,shiftM and shiftN are scale parameters that satisfy shiftM>shiftN, andshiftN may be 0.

Note that the processing in FIG. 22 may also be collectively expressedin the following equation.shiftS=(blkW<TH)?shiftM:shiftN  (Equation P1A)

Note that, in a configuration in which a width blkW of the block size isdifferent from a height blkH, blkW+blkH<TH may be used instead ofblkW<TH as determination for a threshold value of a block size. Notethat the above-described modification may also be appropriately appliedto other processing herein.

Further, for the branching determination, ≤ (less than or equal to) maybe used instead of < (greater than), and branching of Y and N may bereversed by using > and ≥ as the equivalent configuration. Note that theabove-described modification may also be appropriately applied to otherprocessing herein.

As described above, the motion vector scale is derived such that a valueof the motion vector scale is reduced (the motion vector accuracy isincreased) with a greater block size according to the block size. As inthe above-described example, in a configuration in which a block size isclassified according to the block size and a motion vector scale isswitched according to the classification, the number of classificationsof the block size is not limited to two and may be greater than or equalto three.

In this way, according to the above-described configuration, accuracy ofa difference vector can be switched according to a block size. Forexample, accuracy can be switched to high accuracy of a vector in a casethat a block size is greater than a prescribed value, and can beswitched to low accuracy of a motion vector in a case that a block sizeis smaller than the prescribed value. In this way, a motion vectorhaving more appropriate accuracy can be used by switching accuracy ofthe motion vector according to a block size.

Further, in the above-described configuration, accuracy of a differencevector can be switched without using a motion vector accuracy flag.Therefore, the motion vector accuracy flag does not need to be coded anddecoded, and thus a code amount of the coded data is reduced. Moreover,this can improve coding efficiency.

Motion Vector Scale Derivation Processing using Block Size and MotionVector Accuracy Flag

FIG. 23 is used as another example of a configuration (derivationprocessing PS_P1B) to describe motion vector scale derivation processingusing a block size of a target block and a motion vector accuracy flag.FIG. 23 is a flowchart more specifically illustrating the motion vectorscale derivation processing in Steps S3031 and S3041 mentioned above.FIG. 23 specifically exemplifies the processing in S3041 for the sake ofdescription, but the processing illustrated in FIG. 23 may be applied toS3031.

As illustrated in FIG. 23 , whether mvd_dequant_flag !=0 is determinedin S304131. In a case that mvd_dequant_flag !=0 is false (N in S304131),that is, in a case that mvd_dequant_flag is 0, whether the block sizeblkW satisfiesblkW<TH (where TH is a prescribed threshold value)is determined in S304132. In a case that the block size blkW<TH is true(Y in S304132), that is, in a case that the block size blkW is smaller,shiftS=shiftMis configured in S304133, and the processing proceeds to S3042. In acase that the block size blkW<TH is false (N in S304132), that is, in acase that the block size blkW is greater,shiftS=shiftNwhich is a value different from a value (shiftM) in the case that theblock value is smaller, is configured as a motion vector scale inS304133, and the processing proceeds to S3042.

Further, in a case that mvd_dequant_flag !=0 is true (Y in S304131),that is, in a case that mvd_dequant_flag=1, shiftS=shiftL is configured,and the processing proceeds to S3042. Here, shiftL, shiftM, and shiftNare scale parameters that satisfy shiftL≥shiftM>shiftN, and shiftN maybe 0. shiftN=0 corresponds to no dequantization on a motion vector(difference motion vector) (a motion vector that is not coarse by aquantization scale is coded). Note that configuring shiftL=mvBaseAccuand a full pel may be appropriate in the case that mvd_dequant_flag is1.

Note that a part of the processing in FIG. 23 and the processing inS304132 to S304134 (corresponding to FIG. 22 ) can also be expressed bythe above-mentioned (Equation P1A).

The whole processing in FIG. 23 may also be collectively expressed inthe following equation (Equation P1B).shiftS=mvd_dequant_flag!=0?shiftL:(blkW<TH)?shiftM:shiftN  (EquationP1B)

As described above, a constitution is used in which a block size isclassified into modes using motion vectors having multiple degrees ofaccuracy according to the block size, and motion vector accuracy isswitched such that a value of the motion vector scale is reduced (themotion vector accuracy is increased) with a greater block size. Notethat the block size may be classified into three or more instead of two.

According to the above-described configuration, accuracy of a motionvector is determined by referring to both of a block size and a motionvector accuracy flag, and thus a motion vector having more appropriateaccuracy can be used. For example, in a case that accuracy of a motionvector is indicated as integer accuracy (low accuracy) by a motionvector accuracy flag, accuracy of a difference vector is configured tobe integer accuracy (low accuracy) regardless of a block size. In a casethat accuracy of a motion vector is indicated as fractional accuracy(high accuracy) by a motion vector accuracy flag, accuracy of adifference vector can be further switched according to a block size.

Therefore, according to the above-described configuration, codingefficiency can be improved by using a motion vector having moreappropriate accuracy.

Note that the above-mentioned motion vector derivation can be put inother words as follows. Specifically, the inter-prediction parameterdecoding unit 303 (motion vector derivation unit) derives a motionvector by adding a difference vector to a prediction vector orsubtracting a difference vector from a prediction vector for eachprediction block. The inter-prediction parameter decoding unit 303switches accuracy of a motion vector derived for a prediction block(particularly, a shift value used to derive a motion vector differenceabsolute value) according to the size of the prediction block.

Further, a motion vector to be derived by the above-mentioned processingof deriving a motion vector can be expressed by the following equation.In other words, in a case that a motion vector as a derivation target, aprediction vector, a difference vector, and round processing arerespectively expressed as mvLX, mvpLX, mvdLX, and round ( ), a shiftamount shiftS is determined according to the size of a prediction block,and mvLX may be determined bymvLX=round(mvpLX)+(mvdLX<<shiftS).

Note that a motion vector difference absolute value may be dequantizedinstead of the difference vector mvdLX represented by a term of theabove-described (mvdLX<<shiftS). In other words, processing ofdequantizing the motion vector difference absolute value mvdAbsVal maybe performed, and coding processing may be then performed as follows.mvdAbsVal=mvdAbsVal(=|qmvd|)<<shiftSmvdLX=mvdAbsVal*(1−2*mv_sign_flag)mvLX=round(mvpLX)+mvdLX

In the above, the variables mvdAbsVal and mvdLX are expressed by beingupdated, but can be expressed with “′” to clarify the processing asfollows.mvdAbsVal′=mvdAbsVal(=|qmvd|)<<shiftSmvdLX′=mvdAbsVal′*(1−2*mv_sign_flag)mvLX=round(mvpLX)+mvdLX′

As described in the above-described parenthesis ( ), a difference motionvector absolute value before dequantization (that has been quantized)may be represented by qmvd instead of mvdAbsVal.

Various Specific Examples of Round Processing

Round processing is mentioned in the description above. A specificexample of the round processing does not limit the present embodiment,and, for example,round(mvpLX)=(mvpLX>>shiftS<<shiftS)  (SHIFT-1)may be used. Further, a variable in round( ) is not limited to mvpLX.Examples of the round processing may include round processing using thefollowing equation in addition to the above-mentioned example. Forexample,round(mvpLX)=((mvpLX+offsetS)>>shiftS)<<shiftS  (SHIFT-2)may be used with an offset value ofoffsetS=1<<(shiftS−1)Further,round(mvpLX)=mvpLX>0? (mvpLX>>shiftS)<<shiftS:−(((−mvpLX)>>shiftS)<<shiftS)  (SHIFT-3),in other words, in a case that a round target is negative, the roundtarget may be converted into a positive value once by being multipliedby −1, the same processing as (Equation: SHIFT-1) may be performed, andthe round target may be then converted into a negative value by beingmultiplied by −1.

Further,round(mvpLX)=mvpLX>0? ((mvpLX+offsetS)>>shiftS)<<shiftS:−((((−mvpLX+offsetS))>>shiftS)<<shiftS)  (SHIFT-4),in other words, the processing obtained by combining the processing ofEquation (SHIFT-2) and Equation (SHIFT-3) may be used.Example of Motion Vector Accuracy Switched by using Block Size

A specific example of motion vector accuracy switched by using a blocksize of a target block (derivation processing P1A) will be describedbelow by using FIGS. 24A to 24C. FIGS. 24A to 24C are tablesillustrating a relationship between basic vector accuracy and aparameter (shiftS) indicating motion vector accuracy configured(switched) depending on a block size of a target block. For example, theinter-prediction parameter decoding control unit 3031 may perform theprocessing in S304121 to S304123 illustrated in FIG. 22 mentioned abovein a manner as the examples illustrated in FIGS. 24A to 24C.

Note that, herein, a concept of a “basic vector” is introduced, and aparameter specifying accuracy of this basic vector is assumed to berepresented by mvBaseAccu. The “basic vector” is assumed to be decodedvirtually with accuracy of 1<<mvBaseAccu. However, the name of the“basic vector” is only used for the sake of convenience, and the “basicvector” is merely introduced as a reference for specifying accuracy of amotion vector. In this patent, accuracy of a vector when being input tothe motion compensation filter unit 30912 is given by the basic vectoraccuracy. For example, in a case that mvBaseAccu=2, the basic vector isassumed to be handled with ¼ (=1/(1<<mvBaseAccu)) pel accuracy. Themotion compensation filter unit 30912 performs filter processing byusing a set of filter coefficients (filter coefficients from 0 to M−1)of phases from 0 to M−1 (M=(1<<mvBaseAccu)). Further, a derived (used)motion vector may be stored in the prediction parameter memory 108 byusing the accuracy of the basic vector.

FIG. 24A is a table illustrating a relationship among a block size of atarget block, basic vector accuracy, and a parameter shiftS indicatingmotion vector accuracy in a case that the motion vector accuracy isswitched between two values. In the example indicated by “I” in FIG.24A, mvBaseAccu=3, and the accuracy of the basic vector is ⅛ pel. In theexample indicated by “I”, when the block size blkW of the target blocksatisfies blkW>=64, shiftS=0 is configured and the motion vectoraccuracy is ⅛ pel. On the other hand, when the block size blkW satisfiesblkW<64, shiftS=1 is configured and the motion vector accuracy is ¼ pel.

In the example indicated by “II” in FIG. 24A, mvBaseAccu=4, and accuracyof a basic vector is 1/16 pel. In the example indicated by “II”, whenthe block size blkW of the target block satisfies blkW>=64, shiftS=0 isconfigured and the motion vector accuracy is 1/16 pel. On the otherhand, when the block size blkW satisfies blkW<64, shiftS=2 is configuredand the motion vector accuracy is ¼ pel.

In the example indicated by “III” in FIG. 24A, mvBaseAccu=6, and theaccuracy of the basic vector is 1/64 pel. In the example indicated by“III”, when the block size blkW of the target block satisfies blkW>=64,shiftS=0 is configured and the motion vector accuracy is 1/64 pel. Onthe other hand, when the block size blkW satisfies blkW<64, shiftS=4 isconfigured and the motion vector accuracy is ¼ pel.

FIG. 24B is a table illustrating a relationship among a block size of atarget block, basic vector accuracy, and a parameter (shiftS) indicatingmotion vector accuracy in a case that the motion vector accuracy isswitched among three values.

In the example illustrated in FIG. 24B, the basic vector accuracy is1/64 pel. In a case that the block size blkW of the target blocksatisfies blkW>=64, shiftS=0 is configured and the motion vectoraccuracy is 1/64 pel. In a case that the block size blkW satisfiesblkW>=32 && blkW<64, shiftS=2 is configured and the motion vectoraccuracy is 1/16 pel. In a case that the block size blkW satisfiesblkW<32, shiftS=4 is configured and the motion vector accuracy is ¼ pel.

FIG. 24C is a table illustrating a relationship among a block size of atarget block, basic vector accuracy, and a parameter (shiftS) indicatingmotion vector accuracy in a case that the motion vector accuracy isswitched among five values.

In the example illustrated in FIG. 24C, the basic vector accuracy is1/64 pel. In a case that the block size blkW of the target blocksatisfies blkW>=128, shiftS=0 is configured and the motion vectoraccuracy is 1/64 pel. In a case that the block size blkW satisfiesblkW>=64 && blkW<128, shiftS=1 is configured and the motion vectoraccuracy is 1/32 pel. In a case that the block size blkW satisfiesblkW>=32 && blkW<64, shiftS=2 is configured and the motion vectoraccuracy is 1/16 pel. In a case that the block size blkW satisfiesblkW>=16 && blkW<32, shiftS=3 is configured and the motion vectoraccuracy is ⅛ pel. In a case that the block size blkW satisfies blkW<16,shiftS=4 is configured and the motion vector accuracy is ¼ pel.

Use of Motion Vector Accuracy MVQStep

The inter-prediction parameter decoding control unit 3031 may performdequantization by the product of quantization step size MVQStep of amotion vector instead of a left shift by the motion vector scale shiftS.In other words, dequantization may be performed by the followingequation instead of Equation (Scale).mvdAbsVal=mvdAbsVal*MVQStep  Equation (QStep)Here, MVQStep and shiftS satisfy a relationship ofshiftS=log₂(MVQStep)This is equivalent to the following equation.MVQStep=1<<shiftS=2^(shiftS)

With accuracy of a basic motion vector of ⅛, accuracy (MVStep) of amotion vector to be coded is ⅛ in a case that a quantization stepMVQStep is 1, and the accuracy (MVStep) of the motion vector to be codedis ¼ in a case that the quantization step MVQStep is 2. Therefore, withthe accuracy of the basic motion vector of 1/mvBaseAccu, the accuracyMVStep of the motion vector to be coded is 1/mvBaseAccu*MVQStep in thequantization step MVQStep. For example, in a case that switching themotion vector accuracy indicated by “I” in FIG. 24A is performed byusing a product of MVQStep instead of a shift in the quantization scaleshiftS, MVQStep=1 (=1<<ShiftS=1<<0=1) is configured in a case that theblock size blkW satisfies blkW>=64. In other words,MVStep=⅛=(1/mvBaseAccu*MVQStep=⅛*1) is configured. On the other hand,when the block size blkW satisfies blkW<64, MVQStep=2(=1<<ShiftS=1<<1=2) is configured. In other words, MVStep=¼=(⅛*2) isconfigured.

In a case that switching the motion vector accuracy illustrated in FIG.24B is performed by using MVQStep, MVQStep=1 (=1<<shiftS=1<<0) isconfigured when the block size blkW satisfies blkW>=64. In other words,MVStep= 1/64=( 1/64*1) is configured. In a case that the block size blkWsatisfies blkW>=32 && blkW<64, MVQStep=4 (=1<<ShiftS=1<<2=4) isconfigured. In other words, MVStep= 1/16=( 1/64*4) is configured. In acase that the block size blkW satisfies blkW<32, MVQStep=16(=1<<ShiftS=1<<4) is configured. In other words, MVStep=¼=( 1/64*16) isconfigured.

In a case that switching the motion vector accuracy illustrated in FIG.24C is performed by using MVQStep, MVQStep=1 is configured when theblock size blkW satisfies blkW>=128. In other words, MVStep= 1/64 isconfigured. In a case that the block size blkW satisfies blkW>=64 &&blkW<128, MVQStep=2 is configured. In other words, MVStep= 1/32 isconfigured. In a case that the block size blkW satisfies blkW>=32 &&blkW<64, MVQStep=3 is configured. In other words, MVStep= 1/16 isconfigured. In a case that the block size blkW satisfies blkW>=16 &&blkW<32, MVQStep=4 is configured. In other words, MVStep=⅛ isconfigured. In a case that the block size blkW satisfies blkW<16,MVQStep=5 is configured. In other words, MVStep=¼ is configured.

Example of Motion Vector Accuracy Switched by using Block Size andMotion Vector Accuracy Flag

Next, a specific example of motion vector accuracy switched by using ablock size and mvd_dequant_flag being a motion vector accuracy flag(derivation processing PS_P1B) will be described using FIGS. 25A to 25C.FIGS. 25A to 25C are tables illustrating a relationship of a parameter(shiftS) indicating motion vector accuracy configured (switched)depending on a block size of a target block and a motion vector accuracyflag. Note that, each of FIGS. 25A to 25C illustrates the example inwhich the basic vector accuracy is 1/16, but an arbitrary value isapplicable to a value of the basic vector accuracy. The inter-predictionparameter decoding control unit 3031 may perform the processing inS304131 to S304135 illustrated in FIG. 23 mentioned above in a manner asthe examples illustrated in FIGS. 25A to 25C.

In the example illustrated in FIG. 25A, in a case that the motion vectoraccuracy flag is mvd_dequant_flag=0 and a block size is greater than aprescribed value (great block size), shiftS=0 is configured and themotion vector accuracy is 1/16 pel. In a case that the motion vectoraccuracy flag is mvd_dequant_flag=0 and the block size is smaller thanthe prescribed value (small block size), shiftS=2 is configured and themotion vector accuracy is ¼ pel. On the other hand, in a case that themotion vector accuracy flag is mvd_dequant_flag=1, shiftS=4 isconfigured and the motion vector accuracy is 1 pel (full pel). This isexpressed by the following equation.shiftS=mvd_dequant_flag!=0? 4:(blkW<TH)? 2:0

(corresponding to Equation P1B)

In the example illustrated in FIG. 25B, in the case that the motionvector accuracy flag is mvd_dequant_flag=0 and the block size is greaterthan the prescribed value (great block size), shiftS=0 is configured andthe motion vector accuracy MVStep is 1/16 pel. In a case that the motionvector accuracy flag is mvd_dequant_flag=0 and the block size is smallerthan the prescribed value (small block size), shiftS=2 is configured andthe motion vector accuracy is ¼ pel. On the other hand, in a case thatthe motion vector accuracy flag is mvd_dequant_flag=1 and the block sizeis greater than the prescribed value (great block size), shiftS=3 isconfigured and the motion vector accuracy is ½ pel (half pel). In a casethat the motion vector accuracy flag is mvd_dequant_flag=1 and the blocksize is smaller than the prescribed value (small block size), shiftS=4is configured and the motion vector accuracy is 1 pel (full pel).

In the example illustrated in FIG. 25C, in the case that the motionvector accuracy flag is mvd_dequant_flag=0 and the block size is greaterthan the prescribed value (great block size), shiftS=0 is configured andthe motion vector accuracy is 1/16 pel. In the case that the motionvector accuracy flag is mvd_dequant_flag=0 and the block size is smallerthan the prescribed value (small block size), shiftS=1 is configured andthe motion vector accuracy is ⅛ pel. On the other hand, in the case thatthe motion vector accuracy flag is mvd_dequant_flag=1 and the block sizeis greater than the prescribed value (great block size), shiftS=2 isconfigured and the motion vector accuracy is ¼ pel. In the case that themotion vector accuracy flag is mvd_dequant_flag=1 and the block size issmaller than the prescribed value (small block size), shiftS=3 isconfigured and the motion vector accuracy is ½ pel (half pel).

Example of Motion Vector Accuracy Switched by using QP

Note that the configuration in which shiftS is derived based on a blocksize of a target block is described in the above-mentioned example.Another configuration in which the inter-prediction parameter decodingcontrol unit 3031 (motion vector derivation unit) derives shiftS, basedon a Quantization Parameter (QP) being a quantization parameter insteadof a block size of a target block may be used (derivation processingPS_P2A). Particularly, by deriving shiftS according to magnitude of QP(or a prediction value of QP), a motion vector with high accuracy (smallshiftS) is used for small QP, and a motion vector with low accuracy(great shiftS) is used for great QP. For example, QP is determinedaccording to a prescribed value. A motion vector with high accuracy isused in a case that QP is smaller than a prescribed value, and a motionvector with low accuracy is used in other cases.

Here, an example of motion vector accuracy switched by using QP will bedescribed with reference to FIGS. 26A to 26C. FIGS. 26A to 26C aretables illustrating a parameter (shiftS) indicating motion vectoraccuracy configured (switched) depending on QP. For example, theinter-prediction parameter decoding control unit 3031 may perform theprocessing of deriving a difference vector in a manner as the examplesillustrated in FIGS. 26A to 26C. In the description of FIGS. 26A to 26C,a value of basic vector accuracy is not particularly mentioned, and anarbitrary value can be used for basic vector accuracy. FIGS. 26A to 26Crespectively illustrate examples of switching two, three, and fivevalues according to QP, but the number of switching (the number ofclassifications of QP) is not limited to these. Also, a threshold valueused to classify QP is not limited to the examples of the drawing.

FIG. 26A is a table illustrating a relationship between QP and motionvector accuracy (shiftS) in a case that the motion vector accuracy isswitched between two values. In the example illustrated in FIG. 26A, ina case that QP is small (QP<24), shiftS=0 is configured. On the otherhand, in a case that QP is great (QP>=24), a value greater than a valuefor small QP is configured to shiftS, which is shiftS=1 in this case.

The example illustrated in FIG. 26B is a table illustrating arelationship between QP and a parameter (shiftS) indicating motionvector accuracy in a case that the motion vector accuracy is switchedamong three values. As illustrated in FIG. 26B, in a case that QP issmall (QP<12), shiftS=0 is configured. In a case that QP is intermediate(QP>=12 && QP<24), shiftS=1 is configured. In a case that QP is great(QP>=36), shiftS=2 is configured.

FIG. 26C is a table illustrating a correspondence between QP and aparameter (shiftS) indicating motion vector accuracy in a case that themotion vector accuracy is switched among five values. As illustrated inFIG. 26C, in a case that QP<12 is satisfied, shiftS=0 is configured. Ina case that QP>=12 && QP<18 is satisfied, shiftS=1 is configured. In acase that QP>=18 && QP<24 is satisfied, shiftS=2 is configured. In acase that QP>=24 && QP<36 is satisfied, shiftS=3 is configured. In acase that QP>=36 is satisfied, shiftS=4 is configured.

According to the above-described configuration, accuracy of a motionvector derived for the prediction block is switched according tomagnitude of a quantization parameter, and thus a prediction image canbe generated by using a motion vector having appropriate accuracy. Notethat the configuration in which accuracy of a motion vector is switchedaccording to a flag can also be used together.

Use of Motion Vector Accuracy MVQStep

The inter-prediction parameter decoding control unit 3031 may deriveMVQStep as motion vector accuracy instead of shiftS mentioned aboveaccording to a block size of a target block.

For example, in a case that switching the motion vector accuracyillustrated in FIG. 26A is performed by using MVQStep, MVQStep=16 isconfigured when QP<24 is satisfied. In other words, MVStep= 1/16 isconfigured. On the other hand, when QP>=24 is satisfied, MVQStep=4 isconfigured. In other words, MVStep=¼ is configured.

In a case that switching the motion vector accuracy illustrated in FIG.26B is performed by using MVQStep, MVQStep=64 is configured when QP<12is satisfied. In other words, MVStep= 1/64 is configured. In a case thatQP>=12 && QP<36 is satisfied, MVQStep=16 is configured. In other words,MVStep= 1/16 is configured. In a case that QP<36 is satisfied, MVQStep=4is configured. In other words, MVStep=¼ is configured.

In a case that switching the motion vector accuracy illustrated in FIG.26C is performed by using MVQStep, MVQStep=64 is configured when QP<12is satisfied. In other words, MVStep= 1/64 is configured. In a case thatQP>=12 && QP<18 is satisfied, MVQStep=32 is configured. In other words,MVStep= 1/32 is configured. In a case that QP>=18 && QP<24 is satisfied,MVQStep=16 is configured. In other words, MVStep= 1/16 is configured. Ina case that QP>=24 && QP<36 is satisfied, MVQStep=8 is configured. Inother words, MVStep=⅛ is configured. In a case that QP>=36 is satisfied,MVQStep=4 is configured. In other words, MVStep=¼ is configured.

Example of Motion Vector Accuracy Switched by using QP and Motion VectorAccuracy Flag

Next, an example of motion vector accuracy switched by using QP andmvd_dequant_flag being a motion vector accuracy flag (derivationprocessing PS_P2B) will be described with reference to FIGS. 27A and27B. FIGS. 27A and 27B are tables illustrating motion vector accuracy(shiftS) configured (switched) depending on QP and a motion vectoraccuracy flag. The inter-prediction parameter decoding control unit 3031may perform the processing of deriving a difference vector in a manneras the examples illustrated in FIGS. 27A and 27B.

Note that, each of FIGS. 27A and 27B illustrates the example in whichthe basic vector accuracy is 1/16 pel (mvBaseAccu=4), but an arbitraryvalue is applicable to a value of the basic vector accuracy(mvBaseAccu).

In the example illustrated in FIG. 27A, in a case that the motion vectoraccuracy flag mvd_dequant_flag is 1 (other than 0), a value of shiftS isdetermined to be a fixed value regardless of QP. In a case that themotion vector accuracy flag mvd_dequant_flag is 0, a value of motionvector scale shiftS is determined according to QP. For example, in acase that the motion vector accuracy flag is mvd_dequant_flag=0 and QPis smaller than a prescribed value (small QP), shiftS=0 is configuredand the motion vector accuracy is 1/16 pel. In a case that the motionvector accuracy flag is mvd_dequant_flag=0 and QP is greater than theprescribed value (great QP), shiftS=2 is configured and the motionvector accuracy is ¼ pel. On the other hand, in a case that the motionvector accuracy flag is mvd_dequant_flag=1, shiftS=mvBaseAccu (=4) isfixedly configured and the motion vector accuracy is 1 pel (full pel).In this way, also when shiftS is changed according to QP, it isappropriate that shiftS in the case that the motion vector accuracy flagmvd_dequant_flag is 1 is greater (motion vector accuracy is loweraccuracy) than shiftS in other cases (mvd_dequant_flag is 0).

The example illustrated in FIG. 27B illustrates the example of derivingthe motion vector scale shiftS according to QP also in the case that themotion accuracy scale flag is 1 (other than 0). Specifically, in thecase that the motion vector accuracy flag is mvd_dequant_flag=0 and QPis smaller than the prescribed value (small QP), shiftS=0 is configuredand the motion vector accuracy is 1/16 pel. In the case that the motionvector accuracy flag is mvd_dequant_flag=0 and QP is greater than theprescribed value (great QP), shiftS=4 is configured and the motionvector accuracy is 1 pel. On the other hand, in a case that the motionvector accuracy flag is mvd_dequant_flag=1 and QP is smaller than theprescribed value (small QP), shiftS=3 is configured and the motionvector accuracy is ½ pel (half pel). In a case that the motion vectoraccuracy flag is mvd_dequant_flag=1 and QP is greater than theprescribed value (great QP), shiftS=mvBaseAccu (=4) is configured andthe motion vector accuracy is 1 pel (full pel). In this way, in the casethat the motion vector accuracy flag mvd_dequant_flag is 1, it isappropriate to switch the motion vector accuracy between a half pel anda full pel.

Further, a motion vector to be derived by the above-mentioned processingof deriving a motion vector can be expressed by the following equation.Specifically, in a case that a motion vector as a derivation target, aprediction vector, a difference vector, and round processing arerespectively expressed as mvLX, mvpLX, mvdLX, and round ( ), a shiftamount shiftS is determined according to the size of a prediction block,and mvLX is determined bymvLX=round(mvpLX)+(mvdLX<<shiftS).Processing of Dequantizing Difference Vector

Hereinafter, processing of dequantizing a difference vector according tothe present embodiment will be described with reference to FIGS. 28 and29 .

The processing described below is performed by the inter-predictionparameter decoding control unit 3031 unless explicitly describedotherwise.

Dequantization Processing Example 1: Dequantizing Difference Vector withMotion Vector Accuracy According to Quantized Difference Vector

Hereinafter, nonlinear dequantization processing on a quantizeddifference vector qmvd (quantization value, quantized difference vector)by the inter-prediction parameter decoding control unit 3031 will bedescribed.

Note that a quantized difference vector is equivalent to a differencevector absolute value mvdAbsVal at a point in time when a syntax of thecoded data is obtained by decoding (at a point of time beforedequantization), and an absolute value of qmvd is mvdAbsVal. Note thatFIG. 28 illustrates an example in which a quantization value qmvd of adifference vector can be either positive or negative to clarify an imagein either case that the difference vector is negative or positive. Onthe other hand, in actual processing, qmvd may be an absolute value of adifference vector, that is, qmvd=mvdAbsVal. In the followingdescription, qmvd is processed as an absolute value.

FIG. 28 is a graph illustrating a relationship between a quantizeddifference vector and a dequantized difference vector in the processingexample. The horizontal axis of the graph illustrated in FIG. 28 is qmvd(obtained by decoding a difference vector that is quantized and coded ina coding device without being dequantized, that is, a quantization valueof a difference vector) being a quantized difference vector. Thevertical axis of the graph illustrated in FIG. 28 is a difference vector(also simply referred to as a dequantized difference vector) mvd afterdequantization (=dequantized mvdAbsVal). The inter-prediction parameterdecoding control unit 3031 performs dequantization processing on thequantized difference vector qmvd as illustrated in the graph illustratedin FIG. 28 .mvdAbsVal=mvdAbsVal(=qmvd)<<shiftS

Subsequently, the addition unit 3035 adds a dequantized differencevector to a prediction vector or subtracts the dequantized differencevector from the prediction vector to derive a motion vector. Forexample, the motion vector is derived frommvdLX=mvdAbsVal*(1−2*mv_sign_flag)mvLX=round(mvpLX)+mvdLX.

The graph illustrated in FIG. 28 will be described below in detail. Asillustrated in FIG. 28 , the inter-prediction parameter decoding controlunit 3031 switches accuracy of the dequantization processing on thequantized motion vector according to a relationship in the size betweena quantized motion vector difference decoded from the coded data and aprescribed value (dTH).

For example, accuracy of the motion vector is configured to be high in acase that the difference vector mvd has a small absolute value, andaccuracy of the motion vector is configured to be low in a case that thedifference vector mvd has a great absolute value.

In other words, the dequantized difference vector mvd slightly changeswith a change in the quantized difference vector qmvd when thedifference vector mvd is located in the vicinity of a zero point (in thecase that the difference vector mvd has a small absolute value) incomparison with when an absolute value of the difference vector mvd islocated away from the vicinity of the zero point.

The dequantized difference vector greatly changes with a change in thequantized difference vector qmvd when the difference vector mvd islocated away from the vicinity of the zero point (in the case that thedifference vector has a great absolute value) in comparison with in acase that the difference vector mvd is located in the vicinity of thezero point.

This can be achieved by the following configuration. Specifically, in acase that an absolute value of qmvd being the quantized differencevector is less than (or less than or equal to) the prescribed value(threshold value) dTH, the inter-prediction parameter decoding controlunit 3031 performs dequantization specified by a prescribed inclination(proportional coefficient) with respect to the quantized differencevector qmvd. Also, in a case that the quantized difference vector qmvdis greater than the prescribed value dTH, the inter-prediction parameterdecoding control unit 3031 performs dequantization specified by aninclination obtained by bit-shifting the prescribed inclination to theleft by the motion vector scale shiftS. Herein, the prescribedinclination may be, for example, 1.

The description above is summarized as follows (derivation processingQ2). Specifically, the inter-prediction parameter decoding control unit3031 does not perform dequantization processing in a case that thequantized difference vector has a small absolute value (qmvd<dTH).Alternatively, the inter-prediction parameter decoding control unit 3031performs only basic dequantization by multiplication by K (or a leftshift by log 2(K)), and mvdAbsVal is derived frommvdAbsVal=K*qmvd  Equation Q1.

Further, in a case that the quantized difference vector has a greatabsolute value (qmvd>=dTH is satisfied), the inter-prediction parameterdecoding control unit 3031 further performs supplemental dequantizationby a prescribed dequantization scale shiftS in addition to the basicdequantization, and mvdAbsVal is derived frommvdAbsVal=K*(dTH+(qmvd−dTH)<<shiftS)  Equation Q2.

Note that dTH is expressed in the equation, and this is for connectionsuch that a value in Equation Q1 is equal to a value in Equation Q2 inqmvd=dTH. With a focus on a coefficient (inclination) of qmvd, it may benoted that K*1<<shiftS, that is, a dequantization scale is increased byshiftS.

Here, mvdAbsVal is an absolute value of a difference vector afterdequantization, and K represents a prescribed proportional coefficient.As mentioned above, K=1 or K may not be 1. The multiplication by K maybe realized by a left shift by log 2(K). Note that in a case of K=1,dequantization is performed by shiftS only in a case that the quantizeddifference vector qmvd>=dTH is satisfied, and dequantization by shiftSis not performed in a case that qmvd is small.

Specifically, the basic vector accuracy may be ⅛ pel (mvBaseAccu=3),shiftS=1, dTH=16 in Equation Q1 and Equation Q2 described above. In thiscase, in a case that the quantized difference vector qmvd is greaterthan or equal to 16 (motion vector accuracy corresponds to 2 pel orgreater), qmvd is dequantized by a left shift by shiftS=1, and themotion vector accuracy is configured to be ¼ pel. In other words, in acase that qmvd is great, the motion vector accuracy may be configured tobe low.

In another example, the basic vector accuracy may be 1/16 pel(mvBaseAccu=4), shiftS=1, dTH=16 in Equation Q1 and Equation Q2described above. In this case, in a case that the quantized differencevector qmvd is greater than or equal to 16 (motion vector accuracycorresponds to 1 pel or greater), qmvd is dequantized by a left shift byshiftS=1, and the motion vector accuracy is configured to be ⅛ pel. Inother words, in a case that qmvd is great, the motion vector accuracymay be configured to be low.

Note that it can be said that the inter-prediction parameter decodingcontrol unit 3031 derives mvdAbsVal being a difference vector absolutevalue frommvdAbsVal=min(qmvd,dTH)+max(0,(qmvd−dTH)<<shiftS)  Equation Q3when Equation Q1 and Equation Q2 are expressed by one equation.

As another configuration, in a case that the quantized difference vectorqmvd is less than (or less than or equal to) a threshold value dTH, theinter-prediction parameter decoding control unit 3031 performsdequantization specified by an inclination obtained from1<<shiftS1In a case that the quantized difference vector qmvd is greater than orequal to the threshold value dTH (or greater than dTH), theinter-prediction parameter decoding control unit 3031 performsdequantization specified by an inclination obtained from1<<shiftS2Here, shiftS1 and shiftS2 may or may not have values equal to eachother.

According to the above-described configuration, accuracy of thedequantization processing on a difference vector is switched accordingto a value of a quantized difference vector, and thus a prediction imagecan be generated by using a motion vector having more appropriateaccuracy. Further, a code amount of a difference vector can be reduced,and thus coding efficiency is improved.

Dequantization Processing Example 2A: Example of Dequantizing DifferenceVector with Motion Vector Accuracy According to Motion Vector AccuracyFlag and Quantized Difference Vector

Next, an example of dequantizing a difference vector with motion vectoraccuracy according to mvd_dequant_flag being a motion vector accuracyflag and a quantized difference vector will be described (derivationprocessing PS_P2A). In the processing example, in a case that the motionvector accuracy flag satisfies mvd_dequant_flag=1, mvdAbsVal is derivedfrommvdAbsVal=qmvd<<shiftA  Equation Q4.

On the other hand, in a case that the motion vector accuracy flagsatisfies mvd_dequant_flag=0 and quantized difference vectorqmvd<prescribed value dTHS is satisfied, mvdAbsVal is derived frommvdAbsVal=qmvd  Equation Q5.

In a case that the motion vector accuracy flag satisfiesmvd_dequant_flag=0 and quantized difference vector qmvd>=prescribedvalue dTHS is satisfied, mvdAbsVal is derived frommvdAbsVal=dTHS+(qmvd−dTHS)<<shiftS  Equation Q6.

In other words, nonlinear dequantization is performed in a case that themotion vector accuracy flag mvd_dequant_flag==0, and lineardequantization is performed in a case that the motion vector accuracyflag mvd_dequant_flag==1.

The description above is summarized by the following equation.mvdAbsVal=mvd_quant_flag==1?qmvd<<shiftA:qmvd<dTHS?qmvd:dTHS+(qmvd−dTHS)<<shiftS

In other words, the inter-prediction parameter decoding control unit3031 switches accuracy of the dequantization processing on a differencevector according to a value (quantization value) of a quantizeddifference vector in a case that a flag indicating accuracy of a motionvector indicates a first value (in a case of mvd_dequant_flag==0), andperforms the dequantization processing on a difference vector with fixedaccuracy regardless of a quantization value of a quantized differencevector in a case that a flag indicating accuracy of a motion vectorindicates a second value (in a case of mvd_dequant_flag==1).

For example, in a case that the basic vector accuracy is ⅛ pel(mvBaseAccu=3), shiftA=3, shiftS=1, and dTHS=16 in Equation Q4 toEquation Q6 described above, the inter-prediction parameter decodingcontrol unit 3031 performs dequantization on a motion vector by shiftinga motion vector qmvd after quantization (difference motion vectorabsolute value) by shiftA (=3 bits) to the left regardless of qmvd whenthe motion vector accuracy flag mvd_dequant_flag=1 is satisfied. Inother words, the motion vector accuracy is a full pel, and thus themotion vector accuracy is fixedly configured to be lower than that in acase of mvd_dequant_flag=0. On the other hand, when the motion vectoraccuracy flag mvd_dequant_flag=0 is satisfied, the inter-predictionparameter decoding control unit 3031 performs dequantization on a motionvector by shifting a motion vector qmvd after quantization by shiftS (=1bit) to the left in a case that qmvd is greater than or equal to aprescribed threshold value of 16 (corresponding to 2 pel). In otherwords, the motion vector accuracy is a ¼ pel, and thus the motion vectoraccuracy is configured to be lower than that in a case that qmvd is lessthan a prescribed threshold value of 16.

In another example, in a case that the basic vector accuracy is 1/16 pel(mvBaseAccu=4), shiftA=4, shiftS=2, and dTHS=16 in Equation Q4 toEquation Q6 described above, the inter-prediction parameter decodingcontrol unit 3031 performs dequantization on a motion vector by shiftinga motion vector qmvd after quantization by shiftA (=4 bits) to the leftregardless of qmvd when the motion vector accuracy flagmvd_dequant_flag=1 is satisfied. In other words, the motion vectoraccuracy is a full pel, and the motion vector accuracy is configured tobe low. On the other hand, when the motion vector accuracy flagmvd_dequant_flag=0 is satisfied, the inter-prediction parameter decodingcontrol unit 3031 performs dequantization on a motion vector by shiftinga motion vector qmvd after quantization by shiftS (=2 bits) to the leftin a case that a prescribed threshold value qmvd is greater than orequal to 16 (corresponding to 1 pel). In other words, the motion vectoraccuracy is a ¼ pel, and the motion vector accuracy is configured to below.

Note that different values regardless of the above-described example canbe used as a prescribed threshold value and a value of a dequantizationscale (shiftS, shiftA) also in the configuration of Q4 to Q6 describedabove.

According to the above-described configuration, a prediction image canbe generated by using a motion vector having more appropriate accuracy.This improves prediction accuracy, and thus coding efficiency isimproved.

Dequantization Processing Example 2B: Another Example of DequantizingDifference Vector with Motion Vector Accuracy According to Motion VectorAccuracy Flag and Quantized Difference Vector

Next, another example (derivation processing Q2B) of dequantizing adifference vector with motion vector accuracy according to a motionvector accuracy flag and a quantized difference vector will bedescribed. In the present processing example, in a case that the motionvector accuracy flag satisfies mvd_dequant_flag=1 and quantizeddifference vector qmvd<prescribed value dTHA is satisfied, mvdAbsVal isderived frommvdAbsVal=qmvd<<shiftA1  Equation Q7.

In a case that the motion vector accuracy flag satisfiesmvd_dequant_flag=1 and quantized difference vector qmvd>=prescribedvalue dTHA is satisfied, mvdAbsVal is derived frommvdAbsVal=dTHA<<shiftA1+(qmvd−dTHA)<<shiftA2  Equation Q8.

On the other hand, in a case that the motion vector accuracy flagsatisfies mvd_dequant_flag=0 and quantized difference vectorqmvd<prescribed value dTHS is satisfied, mvdAbsVal is derived frommvdAbsVal=qmvd  Equation Q9.

In a case that the motion vector accuracy flag satisfiesmvd_dequant_flag=0 and quantized difference vector qmvd>=dTHS issatisfied, mvdAbsVal is derived frommvdAbsVal=dTHS+(qmvd−dTHS)<<shiftS  Equation Q10.

In other words, nonlinear dequantization is performed on a quantizeddifference vector in either case that the motion vector accuracy flagmvd_dequant_flag==0 or the motion vector accuracy flagmvd_dequant_flag==1.

The description above is summarized by the following equation.mvdAbsVal=mvd_quant_flag==1?qmvd<dTHA?qmvd<<shiftA1:dTHA<<shiftA1+(qmvd−dTHA)<<shiftA2:qmvd<dTHS? qmvd:dTHS+(qmvd−dTHS)<<shiftS

In other words, the inter-prediction parameter decoding control unit3031 switches accuracy of the dequantization processing on a differencevector between first accuracy and second accuracy according to aquantization value (a value qmvd before dequantization) of a quantizeddifference vector in a case that a flag indicating accuracy of a motionvector indicates a first value (in a case of mvd_dequant_flag==0), andswitches accuracy of the dequantization processing on a differencevector between third accuracy and fourth accuracy according to aquantization value of a quantized difference vector in a case that aflag indicating accuracy of a motion vector indicates a second value (ina case of mvd_dequant_flag==1). At least any of the first accuracy andthe second accuracy has higher accuracy than that of the third accuracyand the fourth accuracy.

For example, assuming that the basic vector accuracy is ⅛ pel,shiftA1=2, shiftA2=3, dTHA=4, shiftS=2, and dTHS=16 in Equation Q7 toEquation Q10 described above, in a case that the motion vector accuracyflag mvd_dequant_flag=1 is satisfied and the quantized difference vectorqmvd is less than dTHA=4, the inter-prediction parameter decodingcontrol unit 3031 performs dequantization on a motion vector by shiftinga quantized difference vector qmvd (difference motion vector absolutevalue) by shiftA1=2 to the left. In other words, the motion vectoraccuracy is configured to be a ½ pel, and the motion vector accuracy isconfigured to be low.

In a case that the motion vector accuracy flag mvd_dequant_flag=1 issatisfied and the quantized difference vector qmvd is greater than orequal to dTHA=4, the inter-prediction parameter decoding control unit3031 performs dequantization on a motion vector by shifting a quantizeddifference vector qmvd (difference motion vector absolute value) byshiftA2=3 to the left. In other words, the motion vector accuracy isconfigured to be a 1 pel, and the motion vector accuracy is configuredto be low.

On the other hand, in a case that the motion vector accuracy flagmvd_dequant_flag=0 is satisfied and the quantized difference vector qmvdis less than dTHS=16, the inter-prediction parameter decoding controlunit 3031 configures the motion vector accuracy to be ⅛ being the basicvector accuracy.

In a case that the motion vector accuracy flag mvd_dequant_flag=0 issatisfied and the quantized difference vector qmvd is greater than orequal to dTHS=16, the inter-prediction parameter decoding control unit3031 performs dequantization on a motion vector by shifting a quantizeddifference vector qmvd by shiftS=2 to the left. In other words, themotion vector accuracy is configured to be a ½ pel, and the motionvector accuracy is configured to be low.

According to the above-described configuration, a prediction image canbe generated by using a motion vector having more appropriate accuracy.This improves prediction accuracy, and thus coding efficiency isimproved.

Dequantization Processing Example 3: Dequantization of Difference VectorAccording to Quantized Difference Vector and Round Processing onPrediction Vector

Next, description is given of an example of performing round processingon a prediction vector in a case that dequantization is performed on adifference vector according to a quantized difference vector.

In the present processing example, in a case that the inter-predictionparameter decoding control unit 3031 performs dequantization processingon a difference vector with lower accuracy, a motion vector is derivedby adding a dequantized difference vector to a prediction vector onwhich the round processing is performed by the vector candidateselection unit 3034 or subtracting the dequantized difference vectorfrom the prediction vector.

For example,mvdAbsVal=qmvd+(qmvd−dTH)<<shiftS  Equation Q20can be set from Equation Q3 described in Dequantizing Difference Vectorwith Motion Vector Accuracy according to Quantized Difference Vectormentioned above.

In a case that qmvd being a quantized difference vector is greater thanor equal to a prescribed value dTH, a motion vector mvLX is derived as asum of the prediction vector mvpLX on which the round processing isperformed and the difference vector mvdLX. In other words, the motionvector mvLX is derived frommvLX=round(mvpLX,shiftS)+mvdLX.Here, the motion vector accuracy of mvpLX is reduced to accuracy in1<<shiftS units by round(mvpLX, shiftS). The processing of derivingmvdLX from mvdAbsVal is as described as the sign providing processingPS_SIGN.

On the other hand, in a case that qmvd being the quantized differencevector is less than the prescribed value dTH, the motion vector mvLX isderived as a sum of the prediction vector mvpLX and the differencevector mvdLX. In other words, the motion vector mvLX is derived frommvLX=mvpLX+mvdLX

Dequantization Processing Example 4: Dequantization of Difference VectorAccording to Values of Motion Vector Accuracy Flag and QuantizedDifference Vector and Round Processing on Prediction Vector

In the present processing example, a motion vector is derived by adding,to a prediction vector on which the round processing is performed by thevector candidate selection unit 3034, a difference vector dequantizedaccording to a motion vector accuracy flag and a quantized differencevector or by subtracting the dequantized difference vector from theprediction vector, by the inter-prediction parameter decoding controlunit 3031.

For example, in a case that a motion vector accuracy flag ismvd_dequant_flag=1, mvdAbs is derived frommvdAbsVal=qmvd<<shiftAThen, the motion vector mvLX is derived as a sum of the predictionvector mvpLX on which the round processing is performed and thedifference vector mvdLX, frommvLX=round(mvpLX,shiftA)+mvdLXHere, the motion vector accuracy of mvpLX is reduced to accuracy in1<<shiftA units by round(mvpLX, shiftA). The processing of derivingmvdLX from mvdAbsVal here is as described as the sign providingprocessing PS_SIGN.

On the other hand, the case that the motion vector accuracy flag ismvd_dequant_flag=0 is as follows. In a case that the quantizeddifference vector qmvd is less than the prescribed value dTH, theabsolute value mvdAbsVal of the difference vector is derived to be equalto the quantized difference vector gmvd. In other words, the absolutevalue mvdAbsVal is derived from mvdAbsVal=qmvd. Then, the motion vectormvLX is the sum of the prediction vector mvpLX and the difference vectormvdLX. In other words, the motion vector mvLX is derived frommvLX=mvpLX+mvdLXIn a case that the quantized difference vector qmvd is greater than orequal to the prescribed value dTH, the absolute value mvdAbsVal of thedifference vector is derived frommvdAbsVal=dTHS+(qmvd−dTHS)<<shiftSThen, the motion vector mvLX is the sum of the prediction vector mvpLXon which the round processing is performed and the difference vectormvdLX. In other words, the motion vector mvLX is derived frommvLX=round(mvpLX,shiftS)+mvdLXHere, the motion vector accuracy of mvpLX is reduced to accuracy in1<<shiftS units by round(mvpLX, shiftS). The processing of derivingmvdLX from mvdAbsVal here is as described as the sign providingprocessing PS_SIGN.

Dequantization Processing Example 5: Another Example of Dequantizationof Difference Vector According to Motion Vector Accuracy Flag andQuantized Difference Vector and Round Processing on Prediction Vector

Next, another example of dequantization of a difference vector accordingto a motion vector accuracy flag and a quantized difference vector andround processing on a prediction vector will be described.

In the present processing example, in a case that the inter-predictionparameter decoding control unit 3031 performs dequantization processingon a difference vector with accuracy other than the highest accuracyamong first accuracy, second accuracy, third accuracy, and fourthaccuracy, the addition unit 3035 adds a dequantized difference vector toa prediction vector on which the round processing is performed by thevector candidate selection unit 3034 or subtracts the dequantizeddifference vector from the prediction vector to derive a motion vector.

One example of the present embodiment will be described below in detail.

In a case that the motion vector accuracy flag is mvd_dequant_flag=1,when it is satisfied that the quantized difference vector is less thanthe prescribed value dTHA, mvdAbsVal is derived frommvdAbsVal=qmvd<<shiftA1

Then, the motion vector mvLX is derived as the sum of the predictionvector mvpLX on which the round processing is performed and thedifference vector mvdLX. In other words, the motion vector mvLX isderived frommvLX=round(mvpLX,shiftA1)+mvdLXHere, the motion vector accuracy of mvpLX is reduced to accuracy in1<<shiftA1 units by round(mvpLX, shiftA1).

In a case that the motion vector accuracy flag is mvd_dequant_flag=1,when it is satisfied that the quantized difference vector is greaterthan or equal to the prescribed value dTHA, mvdAbsVal is derived frommvdAbsVal=dTHA<<shiftA1+(qmvd−dTHA)<<shiftA2

Then, the motion vector mvLX is derived as the sum of the predictionvector mvpLX on which the round processing is performed and thedifference vector mvdLX. In other words, the motion vector mvLX isderived frommvLX=round(mvpLX,shiftA2)+mvdLXHere, the motion vector accuracy of mvpLX is reduced to accuracy in1<<shiftA2 units by round(mvpLX, shiftA2). The processing of derivingmvdLX from mvdAbsVal here is as described as the sign providingprocessing PS_SIGN.

On the other hand, the case that the motion vector accuracy flag ismvd_dequant_flag=0 is as follows. In a case that the quantizeddifference vector qmvd is less than the prescribed value dTH, theabsolute value mvdAbsVal of the difference vector is derived to be equalto the quantized difference vector gmvd. In other words, the absolutevalue mvdAbsVal is derived from mvdAbsVal=qmvd. Then, the motion vectormvLX is the sum of the prediction vector mvpLX and the difference vectormvdLX. In other words, the motion vector mvLX is derived frommvLX=mvpLX+mvdLXIn a case that the quantized difference vector qmvd is greater than orequal to the prescribed value dTH, the absolute value mvdAbsVal of thedifference vector is derived frommvdAbsVal=dTHS+(qmvd−dTHS)<<shiftSThen, the motion vector mvLX is the sum of the prediction vector mvpLXon which the round processing is performed and the difference vectormvdLX. In other words, the motion vector mvLX is derived frommvLX=round(mvpLX,shiftS)+mvdLXHere, the motion vector accuracy of mvpLX is reduced to accuracy in1<<shiftS units by round(mvpLX, shiftS). The processing of derivingmvdLX from mvdAbsVal here is as described as the sign providingprocessing PS_SIGN.Flow of Motion Vector Scale Derivation Processing Using QuantizedDifference Vector

FIG. 29 is a flowchart more specifically illustrating the motion vectorscale derivation processing in Steps S3031 (see FIG. 19 ) and S3041 (seeFIG. 20 ) mentioned above. FIG. 29 specifically exemplifies theprocessing in S3041 for the sake of description, but the processingillustrated in FIG. 22 may be applied to S3031.

As illustrated in FIG. 29 , it is determined whether quantizeddifference vector qmvd<prescribed value dTH is satisfied in S304131. Ina case that quantized difference vector qmvd<prescribed value dTH isfalse (N in S304131), shiftS=M is configured in S304132. In a case thatquantized difference vector qmvd<prescribed value dTH is true (Y inS304131), shiftS=0 is configured in S304133. Next, the processingproceeds to S3042.

Motion Compensation Filter

Hereinafter, a motion compensation filter provided in the motioncompensation unit 3091 will be described with reference to FIGS. 30 to32 .

FIG. 30 is a block diagram illustrating a specific configuration of themotion compensation unit 3091. As illustrated in FIG. 30 , the motioncompensation unit 3091 includes a motion vector application unit 30911,a motion compensation filter unit (filter unit) 30912, and a filtercoefficient memory 30913.

Based on a prediction list using flag predFlagLX, a reference pictureindex refIdxLx, and a motion vector mvLX input from the inter-predictionparameter decoding unit 303, the motion vector application unit 3091reads a block in a position deviated by a motion vector mvLX from aposition of a decoding target block of a reference picture designated inthe reference picture index refIdxLx from the reference picture memory306, and thus generates a motion vector applied image.

In a case that the motion vector mvLX is not integer accuracy and is 1/Mpixel accuracy (where M is a natural number of two or greater), themotion vector applied image is also the 1/M pixel accuracy.

In a case that the motion vector mvLX is not integer accuracy, themotion compensation filter 30912 causes a filter using filtercoefficients mcFilter[i][k] (where i is an integer of 0 or greater andM−1 or less, k is an integer of 0 or greater and Ntaps−1 or less) to acton the motion vector applied image, and thus generates theabove-mentioned motion compensation image (predSamplesL0 in a case of amotion compensation image with L0 prediction, predSamplesL1 in a case ofa motion compensation image with L1 prediction, and predSamplesLX in acase of no distinction between the both predictions).

In a case that the motion vector mvLX is integer accuracy, the motioncompensation filter 30912 does not cause to the filter to act on amotion vector applied image, and the motion vector applied image servesas a motion compensation image without change.

The filter coefficient memory 30913 stores a motion compensation filtercoefficient decoded from the coded data. More specifically, the filtercoefficient memory 30913 stores at least a part of filter coefficientsrelated to i among filter coefficients mcFilter[i][k] (where i is aninteger of 0 or greater and M−1 or less, k is an integer of 0 or greaterand Ntaps−1 or less) used by the motion compensation filter 30912.

Filter Coefficients

Now, details of the filter coefficients mcFilter[i][k] will be describedby using FIG. 31 . FIG. 31 is a diagram illustrating one example offilter coefficients according to the present embodiment.

FIG. 31 exemplifies filter coefficients mcFilter[i][k] in which a totalnumber of phases (i=0 to 15) of a motion vector applied image is 16 andthe number of taps of a filter is 8 (8 taps (k=0 to 7)). In thisexample, a total number of phases (i=0 to 15) is 16. In a case that thetotal number of phases is 16, accuracy of a motion vector is 1/16 pixelaccuracy. In other words, in a case that the total number of phases isM, accuracy of a motion vector is 1/M pixel accuracy.

For example, filter coefficients {0, 0, 0, 64, 0, 0, 0, 0} indicated inthe highest column in FIG. 31 represents a filter coefficient in eachcoefficient position in a phase i=0. Here, the coefficient positionrepresents a relative position of a pixel on which a filter coefficientacts. Similarly, each filter coefficient indicated in another column inFIG. 31 is a filter coefficient for corresponding coefficient positionof another phase (i=1 to 15).

The total number of filter coefficients is a value obtained bymultiplying the number of taps of a filter and the number of phases(namely, a reciprocal of accuracy of a motion vector).

Calculation of Filter Coefficients

The above-described filter coefficients mcFilter[i][k] used by themotion compensation filter unit (filter unit) 30912 may include a filtercoefficient calculated by using filter coefficients mcFilter[p][k] (p≠i)and filter coefficients mcFilter[q][k] (q≠i). Details of an example ofcalculating the filter coefficients mcFilter[i][k] are as follows.

Calculation Example 1: Calculating Filter Coefficient of Phase i fromAverage of Filter Coefficients of Phases i−1 and i+1

One example of calculating the filter coefficients according to thepresent embodiment will be described by using FIGS. 32A and 32B.

FIG. 32A illustrates an example in which the motion compensation filterunit 30912 calculates, from filter coefficients of a part of (here,even) phases, filter coefficients of another phase (here, an odd phase),and the calculated filter coefficient is used. In FIG. 32A, the filtercoefficients of even phases are underlined.

In the example illustrated in FIG. 32A, the filter coefficient memory30913 stores the filter coefficients of the even phases. Then, thefilter coefficients of an odd phase i are calculated from an average offilter coefficients of even phases i−1 and i+1. In other words, in acase that i %2=1 (a reminder is 1 when dividing i by 2),mcFilter[i][k]=(mcFilter[i−1][k]+mcFilter[i+1][k])/2. Further,mcFilter[i][k] stored in the filter coefficient memory 30913 is used asthe filter coefficients of the even phase i. In other words, in a casethat i %2=0 (a reminder is 0 when dividing i by 2),mcFilter[i][k]=mcFilter[i][k].

In the case of i %2=1,mcFilter[i][k]=(mcFilter[i−1][k]+mcFilter[i+1][k])>>1 may be set.

Further, filter coefficients of a part of odd phases may be stored inthe filter coefficient memory 30913, and the motion compensation filterunit 30912 may use the stored filter coefficients as the filtercoefficients.

Note that the above-described configuration is equivalent to aconfiguration in which filter coefficients mcFilterC as a reference arestored in the filter coefficient memory 30913 and the filtercoefficients mcFilter being actually used is derived from the followingequation.mcFilter[i][k]=mcFilterC[i>>1][k](i=0,2,4, . . . ,2n,2n+1,n=7)mcFilter[i][k]=(mcFilterC[i>>1][k]+mcFilterC[(i>>1)+1][k])/2(i=1,3,5, .. . ,2n+1,n=6)

Here, the division described with /2 may be >>1.

For example, in the example illustrated in FIG. 32A, the following tablemay be used as mcFilterC.

mcFilterC[ ][ ] = { { 0, 0, 0, 64, 0, 0, 0, 0 }, { −1, 2, −5, 62, 8, −3,1, 0 }, { −1, 4, −10, 58, 17, −5, 1, 0 }, { −1, 3, −9, 47, 31, −10, 4,−1 }, { −1, 4, −11, 40, 40, −11, 4, −1 }, { −1, 4, −10, 31, 47, −9, 3,−1 }, { 0, 1, −5, 17, 58, −10, 4, −1 }, { 0, 1, −3, 8, 62, −5, 2, −1 },{ 0, 1, −2, 4, 63, −3, 1, 0 } }

On the other hand, FIG. 32B illustrates an example in which the motioncompensation filter unit 30912 calculates, from the filter coefficientsof a part of (here, odd) phases, the filter coefficients of anotherphase (here, an even phase). In FIG. 32B, the filter coefficients of oddphases are underlined.

In the example illustrated in FIG. 32B, the filter coefficient memory30913 stores the filter coefficients of the odd phases. Then, the filtercoefficients of an even phase i are calculated from an average of filtercoefficients of odd phases i−1 and i+1. In other words, in a case that i%2=0 (a reminder is 0 when dividing i by 2),mcFilter[i][k]=(mcFilter[i−1][k]+mcFilter[i+1][k])/2. Further,mcFilter[i][k] stored in the filter coefficient memory 30913 is used inthe odd phase i. In other words, in a case that i %2=1 (a reminder is 1when dividing i by 2), mcFilter[i][k]=mcFilter[i][k].

In the case of i %2=0,mcFilter[i][k]=(mcFilter[i−1][k]+mcFilter[i+1][k])>>1 may be set.

The above-described configuration is equivalent to a configuration inwhich the filter coefficients mcFilterC as a reference are stored in thefilter coefficient memory 30913 and the filter coefficients mcFilterbeing actually used is derived from the following equation.mcFilter[i][k]=mcFilterC[i>>1][k](i=0,1,3,5, . . . ,2n+1,n=7)mcFilter[i][k]=(mcFilterC[i>>1][k]+mcFilterC[(i>>1)+1][k])/2(i=0,2,4,6,. . . ,2n+1,n=7)

Here, /2 may be >>1.

For example, in the example illustrated in FIG. 32B, the following tablemay be used as mcFilterC.

mcFilterC[ ][ ] = { { 0, 0, 0, 64, 0, 0, 0, 0 }, { 0, 1, −3, 63, 4, −2,1, 0 }, { −1, 3, −8, 60, 13, −4, 1, 0 }, { −1, 4, −11, 52, 26, −8, 3, −1}, { −1, 4, −11, 45, 34, −10, 4, −1 }, { −1, 4, −10, 34, 45, −11, 4, −1}, { −1, 3, −8, 26, 52, −11, 4, −1 }, { 0, 1, −4, 13, 60, −8, 3, −1 }, {0, 1, −2, 4, 63, −3, 1, 0 } }

Further, filter coefficients of a part of even phases may be stored inthe filter coefficient memory 30913, and the motion compensation filterunit 30912 may use the stored filter coefficients as the filtercoefficients.

Calculation Example 2: Calculating Filter Coefficient of Phase i byLinear Interpolation of Filter Coefficients of Other Adjacent Phases

Next, an example in which the motion compensation filter unit 30912calculates the filter coefficients of the phase i by linearinterpolation of filter coefficients of other adjacent phases will bedescribed. The motion compensation filter unit 30912 calculates thefilter coefficients of the phase i by using the following equation.mcFilter[i][k]=((N−w)*mcFilter[i0][k]+w*mcFilter[i1][k])>>log(N)

Here, i0=(i/N)*N, i1=i0+N, w=(I % N), and N is an integer of two orgreater.

In other words, the above-described filter coefficients Filter[i][k]include filter coefficients that satisfymcFilter[i][k]=((N−w)*mcFilter[i0][k]+w*mcFilter[i1][k])>>log 2(N),where i0=(i/N)*N, i=i0+N, w=(i % N), and N is an integer of two orgreater.

The above-described configuration is equivalent to a configuration inwhich the filter coefficients mcFilterC as a reference are stored in thefilter coefficient memory 30913 and the filter coefficients mcFilterbeing actually used is derived from the following equation.

The above-described configuration is equivalent to a configuration inwhich the filter coefficients mcFilterC as a reference are stored in thefilter coefficient memory 30913 and the filter coefficients mcFilterbeing actually used is derived from the following equation.mcFilter[i][k]=mcFilterC[i>>log 2(N)][k](i=N*n)mcFilter[i][k]=((N−w)*mcFilterC[i>>log 2(N)][k]+w*mcFilter[i>>log2(N))+1][k])>>log 2(N)(i !=N*n)

The following configuration may be used.mcFilter[i][k]=mcFilterC[i>>log 2(N)][k](i=0,N*n+1)mcFilter[i][k]=((N−w)*mcFilterC[i>>log 2(N)][k]+w*mcFilter[i>>log2(N))+1][k])>>log 2(N)(i!=N*n+1)

According to the configuration illustrated in the calculation examplesabove, all of the motion compensation filter coefficients may not bestored in the filter coefficient memory 30913. Therefore, the capacityof memory for storing filter coefficients can be reduced. Further, apart of filter coefficients among motion compensation filtercoefficients may be included in the coded data, and thus a code amountof the coded data is reduced and improvement in coding efficiency can beexpected.

(Configuration of Image Coding Device)

Next, a configuration of the image coding device 11 according to thepresent embodiment will be described. FIG. 12 is a block diagramillustrating the configuration of the image coding device 11 accordingto the present embodiment. The image coding device 11 is configured toinclude a prediction image generation unit 101, a subtraction unit 102,a DCT and quantization unit 103, an entropy coding unit 104, adequantization and inverse DCT unit 105, an addition unit 106, aprediction parameter memory (prediction parameter storage unit, framememory) 108, a reference picture memory (reference image storage unit,frame memory) 109, a coding parameter determination unit 110, aprediction parameter coding unit 111, and a residual storage unit 313(residual recording unit). The prediction parameter coding unit 111 isconfigured to include an inter-prediction parameter coding unit 112 andan intra-prediction parameter coding unit 113.

The prediction image generation unit 101 generates a prediction pictureblock P of a picture for each block, the picture being of a layer imageT input from outside for each viewpoint, the block being an areaobtained by partitioning the picture. Here, the prediction imagegeneration unit 101 reads out a reference picture block, based on aprediction parameter input from the prediction parameter coding unit 111from the reference picture memory 109. The prediction parameter inputfrom the prediction parameter coding unit 111 is a motion vector or adisplacement vector, for example. The prediction image generation unit101 reads out a reference picture block of a block at a locationindicated by a motion vector or displacement vector predicted with astarting point being a coding target block. The prediction imagegeneration unit 101 generates the prediction picture block P for theread out reference picture block by use of one prediction scheme ofmultiple prediction schemes. The prediction image generation unit 101outputs the generated prediction picture block P to the subtraction unit102. The prediction image generation unit 101 operates in the same wayas the prediction image generation unit 308 described already, andtherefore, a detailed description of generating the prediction pictureblock P is omitted.

The prediction image generation unit 101, in selecting the predictionscheme, selects a prediction scheme which minimizes an error value basedon a difference between a signal value for each pixel in the blockincluded in the image and a signal value for each of correspondingpixels in the prediction picture block P, for example. The method ofselecting the prediction scheme is not limited to the above.

Multiple prediction schemes include the intra-prediction, the motionprediction, and the merge prediction. The motion prediction is theprediction between display times among the inter-predictions describedabove. The merge prediction is prediction using the reference pictureblock and prediction parameter the same as for a block which is alreadycoded and in a predefined range from the coding target block.

The prediction image generation unit 101, in a case of selecting theintra-prediction, outputs a prediction mode IntrapredMode indicating theintra-prediction mode which has been used in generating the predictionpicture block P to the prediction parameter coding unit 111.

The prediction image generation unit 101, in a case of selecting themotion prediction, stores the motion vector mvLX which has been used ingenerating the prediction picture block P in the prediction parametermemory 108, and outputs the motion vector to the inter-predictionparameter coding unit 112. The motion vector mvLX indicates a vectorfrom a location of the coding target block to a location of thereference picture block in generating the prediction picture block P.Information indicating the motion vector mvLX includes informationindicating the reference picture (e.g., reference picture indexrefIdxLX, picture order count POC), and may indicate the predictionparameter. The prediction image generation unit 101 outputs theprediction mode predMode indicating the inter-prediction mode to theprediction parameter coding unit 111.

The prediction image generation unit 101, in a case of selecting themerge prediction, outputs the merge index merge_idx indicating theselected reference picture block to the inter-prediction parametercoding unit 112. The prediction image generation unit 101 outputs theprediction mode predMode indicating the merge prediction mode to theprediction parameter coding unit 111.

The prediction image generation unit 101 may be configured to generatethe motion compensation filter coefficients to which the motioncompensation unit 3091 included in the image decoding device 31 refers.

The prediction image generation unit 101 may have a configurationcorresponding to switching of accuracy of the motion vector described asto the image decoding device 31. In other words, the prediction imagegeneration unit 101 may switch the accuracy of the motion vectordepending on the block size, QP, and the like. The prediction imagegeneration unit 101 may be configured to code the motion vector accuracyflag mvd_dequant_flag referred when switching the accuracy of the motionvector in the image decoding device 31.

The subtraction unit 102 subtracts for each pixel the signal value ofthe prediction picture block P input from the prediction imagegeneration unit 101 from the signal value of the corresponding block ofthe layer image input from outside to generate a residual signal. Thesubtraction unit 102 outputs the generated residual signal to the DCTand quantization unit 103 and the coding parameter determination unit110.

The DCT and quantization unit 103 performs DCT on the residual signalinput from the subtraction unit 102 to compute DCT coefficients. The DCTand quantization unit 103 quantizes the computed DCT coefficients tofind quantized coefficients. The DCT and quantization unit 103 outputsthe found quantized coefficients to the entropy coding unit 104 and thedequantization and inverse DCT unit 105.

To the entropy coding unit 104, input are the quantized coefficientsfrom the DCT and quantization unit 103 and coding parameters from thecoding parameter determination unit 110. Examples of the input codingparameters include the codes such as the reference picture indexrefIdxLX, the prediction vector index mvp_LX_idx, the difference vectormvdLX, the prediction mode predMode, and the merge index merge_idx.

The entropy coding unit 104 may be configured to perform processing thatcorresponds to nonlinear dequantization processing described as to theimage decoding device 31, that is, nonlinear dequantization processingto a difference vector, before coding the difference vector mvdLX.

The entropy coding unit 104 performs entropy coding on the inputquantized coefficients and coding parameters to generate a coded streamTe, and outputs, to outside, the generated coded stream Te.

The dequantization and inverse DCT unit 105 dequantizes the quantizedcoefficients input from the DCT and quantization unit 103 to find DCTcoefficients. The dequantization and inverse DCT unit 105 performsinverse DCT on the found DCT coefficients to compute a decoded residualsignal. The dequantization and inverse DCT unit 105 outputs the computeddecoded residual signal to the addition unit 106.

The addition unit 106 adds for each pixel a signal value of theprediction picture block P input from the prediction image generationunit 101 and a signal value of the decoded residual signal input fromthe dequantization and inverse DCT unit 105 to generate a referencepicture block. The addition unit 106 store the generated referencepicture block in the reference picture memory 109.

The prediction parameter memory 108 stores the prediction parametergenerated by the prediction parameter coding unit 111 in a predefinedlocation for each coding target picture and block.

The reference picture memory 109 stores the reference picture blockgenerated by the addition unit 106 in a predefined location for eachcoding target picture and block.

The coding parameter determination unit 110 selects one set from amongmultiple sets coding parameters. The coding parameters are theprediction parameters described above or parameters to be predicted thatare generated in association with the prediction parameters. Theprediction image generation unit 101 uses each of these sets of codingparameters to generate the prediction picture block P.

The coding parameter determination unit 110 computes a cost valueindicating a size of an amount of information and a coding error foreach of multiple sets. The cost value is a sum of a code amount and avalue obtained by multiplying a square error by a coefficient λ, forexample. The code amount is an amount of information of the coded streamTe obtained by performing entropy coding on the quantization error andthe coding parameters. The square error is a sum of squares of residualerror values of the residual signals computed by the subtraction unit102 for respective pixels. The coefficient λ, is a preconfigured realnumber greater than zero. The coding parameter determination unit 110selects a set of coding parameters for which the computed cost value isminimum. This allows the entropy coding unit 104 to output, to outside,the selected set of coding parameters as the coded stream Te and not tooutput the not selected set of coding parameters.

The prediction parameter coding unit 111 derives a prediction parameterused for generating the prediction picture, based on the parameter inputfrom the prediction image generation unit 101 and codes the derivedprediction parameter to generate a set of coding parameters. Theprediction parameter coding unit 111 outputs the generated set of codingparameters to the entropy coding unit 104.

The prediction parameter coding unit 111 stores the prediction parametercorresponding to the set selected by the coding parameter determinationunit 110 among the generated set of coding parameters in the predictionparameter memory 108.

In a case that the prediction mode predMode input from the predictionimage generation unit 101 specifies the inter-prediction mode, theprediction parameter coding unit 111 makes the inter-predictionparameter coding unit 112 operate. In a case that the prediction modepredMode specifies the intra-prediction mode, the prediction parametercoding unit 111 makes the intra-prediction parameter coding unit 113operate.

The inter-prediction parameter coding unit 112 derives aninter-prediction parameter, based on the prediction parameter input fromthe coding parameter determination unit 110. The inter-predictionparameter coding unit 112 has, as a configuration for deriving theinter-prediction parameter, a configuration the same as theconfiguration in which the inter-prediction parameter decoding unit 303(see FIG. 5 , or the like) derives the inter-prediction parameter. Theconfiguration of the inter-prediction parameter coding unit 112 isdescribed below.

The intra-prediction parameter coding unit 113 defines, as a set ofinter-prediction parameters, the intra-prediction mode IntraPredModewhich is specified by the prediction mode predMode input from the codingparameter determination unit 110.

Configuration of Inter-prediction Parameter Coding Unit

Next, a description is given of the configuration of theinter-prediction parameter coding unit 112. The inter-predictionparameter coding unit 112 is means corresponding to the inter-predictionparameter decoding unit 303.

FIG. 13 is a schematic diagram illustrating the configuration of theinter-prediction parameter coding unit 112 according to the presentembodiment.

The inter-prediction parameter coding unit 112 is configured to includea merge prediction parameter derivation unit 1121, an AMVP predictionparameter derivation unit 1122, a subtraction unit 1123, and aprediction parameter integration unit 1126.

The merge prediction parameter derivation unit 1121 has a configurationsimilar to the merge prediction parameter derivation unit 3036 describedabove (see FIG. 7 ) and the AMVP prediction parameter derivation unit1122 has a configuration similar to the AMVP prediction parameterderivation unit 3032 described above (see FIG. 8 ).

In a case that prediction mode predMode input from the prediction imagegeneration unit 101 specifies the merge prediction mode, the merge indexmerge_idx is input from the coding parameter determination unit 110 tothe merge prediction parameter derivation unit 1121. The merge indexmerge_idx is output to the prediction parameter integration unit 1126.The merge prediction parameter derivation unit 1121 reads out areference picture index refIdxLX and motion vector mvLX of a referenceblock indicated by the merge index merge_idx among the merge candidatesfrom the prediction parameter memory 108. The merge candidate is areference block in a predefined range from the coding target block to becoded (e.g., a reference block in contact with a lower left end, upperleft end, or upper right end of coding target block), is a referenceblock on which the coding processing is completed.

The AMVP prediction parameter derivation unit 1122 has a configurationsimilar to the AMVP prediction parameter derivation unit 3032 describedabove (see FIG. 8 ).

To be more specific, in a case that the prediction mode predMode inputfrom the prediction image generation unit 101 specifies theinter-prediction mode, the motion vector mvLX is input from the codingparameter determination unit 110 to the AMVP prediction parameterderivation unit 1122. The AMVP prediction parameter derivation unit 1122derives a prediction vector mvpLX, based on the input motion vectormvLX. The AMVP prediction parameter derivation unit 1122 outputs thederived prediction vector mvpLX to the subtraction unit 1123. Thereference picture index refIdx and the prediction vector indexmvp_LX_idx are output to the prediction parameter integration unit 1126.

The subtraction unit 1123 subtracts the prediction vector mvpLX inputfrom the AMVP prediction parameter derivation unit 1122 from the motionvector mvLX input from the coding parameter determination unit 110 togenerate a difference vector mvdLX. The difference vector mvdLX isoutput to the prediction parameter integration unit 1126.

In a case that prediction mode predMode input from the prediction imagegeneration unit 101 specifies the merge prediction mode, the predictionparameter integration unit 1126 outputs the merge index merge_idx inputfrom the coding parameter determination unit 110 to the entropy codingunit 104.

In a case that the prediction mode predMode input from the predictionimage generation unit 101 specifies the inter-prediction mode, theprediction parameter integration unit 1126 performs the processingbelow.

The prediction parameter integration unit 1126 integrates the referencepicture index refIdxLX and prediction vector index mvp_LX_idx input fromthe coding parameter determination unit 110 and the difference vectormvdLX input from the subtraction unit 1123. The prediction parameterintegration unit 1126 outputs the integrated code to the entropy codingunit 104.

The inter-prediction parameter coding control unit 112 may include aninter-prediction parameter coding control unit (not illustrated) whichinstructs the entropy coding unit 104 to decode the code (syntaxelement) associated with the inter-prediction to code the code (syntaxelement) included in the coded data, for example, the partition modepart_mode, the merge flag merge_flag, the merge index merge_idx, theinter-prediction flag inter_pred_idc, the reference picture indexrefIdxLX, the prediction vector index mvp_LX_idx, and the differencevector mvdLX.

In this case, an inter-prediction parameter coding control unit 1031 isconfigured to include a merge index coding unit (corresponding to themerge index decoding unit 30312 in FIG. 10 ), a vector candidate indexcoding unit (corresponding to the vector candidate index decoding unit30313 in FIG. 10 ), and a partition mode coding unit, a merge flagcoding unit, an inter-prediction flag coding unit, a reference pictureindex coding unit, a vector difference coding unit, and the like. Thepartition mode coding unit, the merge flag coding unit, the merge indexcoding unit, the inter-prediction flag coding unit, the referencepicture index coding unit, the vector candidate index coding unit, andthe vector difference coding unit code respectively the partition modepart_mode, the merge flag merge_flag, the merge index merge_idx, theinter-prediction flag inter_pred_idc, the reference picture indexrefIdxLX, the prediction vector index mvp_LX_idx, and the differencevector mvdLX.

A part of the image coding device 11 and the image decoding device 31 inthe embodiment described above, for example, the entropy decoding unit301, the prediction parameter decoding unit 302, the prediction imagegeneration unit 101, the DCT and quantization unit 103, the entropycoding unit 104, the dequantization and inverse DCT unit 105, the codingparameter determination unit 110, the prediction parameter coding unit111, the entropy decoding unit 301, the prediction parameter decodingunit 302, the prediction image generation unit 308, and thedequantization and inverse DCT unit 311 may be implemented by acomputer. In this case, this configuration may be realized by recordinga program for realizing such control functions on a computer-readablerecording medium and causing a computer system to read the programrecorded on the recording medium for execution. Note that it is assumedthat the “computer system” herein refers to a computer system built intoany of the image coding devices 11 to 11 h, the image decoding devices31 to 31 h, and the computer system includes an OS and hardwarecomponents such as a peripheral device. Furthermore, the“computer-readable recording medium” refers to a portable medium such asa flexible disk, a magneto-optical disk, a ROM, and a CD-ROM, and astorage device such as a hard disk built into the computer system.Moreover, the “computer-readable recording medium” may include a mediumthat dynamically retains the program for a short period of time, such asa communication line that is used to transmit the program over a networksuch as the Internet or over a communication line such as a telephoneline, and a medium that retains, in that case, the program for a fixedperiod of time, such as a volatile memory within the computer systemwhich functions as a server or a client. Furthermore, the program may beconfigured to realize some of the functions described above, and alsomay be configured to be capable of realizing the functions describedabove in combination with a program already recorded in the computersystem.

The image coding device 11 and image decoding device 31 in the presentembodiment described above may be partially or completely realized as anintegrated circuit such as a Large Scale Integration (LSI) circuit. Thefunctional blocks of the image coding device 11 and the image decodingdevice 31 may be individually realized as processors, or may bepartially or completely integrated into a processor. The circuitintegration technique is not limited to LSI, and the integrated circuitsfor the functional blocks may be realized as dedicated circuits or amulti-purpose processor. Furthermore, in a case where with advances insemiconductor technology, a circuit integration technology with which anLSI is replaced appears, an integrated circuit based on the technologymay be used.

The embodiment of the disclosure has been described in detail abovereferring to the drawings, but the specific configuration is not limitedto the above embodiments and various amendments can be made to a designthat fall within the scope that does not depart from the gist of thedisclosure.

Application Example

The image coding device 11 and the image decoding device 31 describedabove can be used in a state of being equipped on various devices fortransmitting, receiving, recording, and reproducing a video. The videomay be a natural video imaged by a camera or the like, or an artificialvideo (including CG and GUI) generated by using a computer or the like.

First, a description is given of that the image coding device 11 and theimage decoding device 31 described above can be used to receive andtransmit the video with reference to FIGS. 33A and 33B.

FIG. 33A is a block diagram illustrating a configuration of atransmission device PROD_A equipped with the image coding device 11. Asillustrated in FIG. 33A, the transmission device PROD__A includes acoding unit PROD_A1 that codes a video to acquire coded data, amodulation unit PROD_A2 that modulates a carrier wave by using the codeddata acquired by the coding unit PROD_A1 to acquire a modulated signal,and a transmitter PROD_A3 that transmits the modulated signal acquiredby the modulation unit PROD_A2. The image coding device 11 describedabove is used as the coding unit PROD_A1.

The transmission device PROD_A may further include, as resources forsupplying a video input to the coding unit PROD_A1, a camera PROD_A4that images a video, a recording medium PROD_A5 that records a videotherein, an input terminal PROD_A6 that inputs a video from outside, andan image processing unit A7 that generates or processes an image. FIG.33A illustrates the configuration in which the transmission devicePROD_A includes all of the above components, but some of these may beomitted.

The recording medium PROD_A5 may recode the video not coded, or thevideo coded using a coding scheme for recording different from thecoding scheme for transmission. In the latter case, a decoding unit (notillustrated) which decodes the coded data read out from the recordingmedium PROD_A5 in accordance with the coding scheme for recording may beprovided between the recording medium PROD_A5 and the coding unitPROD_A1.

FIG. 33B is a block diagram illustrating a configuration of a receptiondevice PROD_B equipped with the image decoding device 31. As illustratedin FIG. 33B, the reception device PROD_B includes a receiver PROD_B1that receives a modulated signal, a demodulation unit PROD_B2 thatdemodulate the modulated signal received by the receiver PROD_B1 toacquire coded data, and a decoding unit PROD_B3 that decodes the codeddata acquired by the demodulation unit PROD_B2 to acquire a video. Theimage decoding device 31 described above is used as the decoding unitPROD_B3.

The reception device PROD_B may further include, as supply destinationsof the video output by the decoding unit PROD_B3, a display PROD_B4 thatdisplays the video, a recording medium PROD_B5 that records the video,and an output terminal PROD_B6 that outputs the video to outside. FIG.33B illustrates the configuration in which the reception device PROD_Bincludes all of the above components, but some of these may be omitted.

The recording medium PROD_B5 may be configured to recode the video notcoded, or the video coded using a coding scheme for recording differentfrom the coding scheme for transmission. In the latter case, a codingunit (not illustrated) which codes the video acquired from the decodingunit PROD_B3 in accordance with the coding scheme for recording may beprovided between the decoding unit PROD_B3 and the recording mediumPROD_B5.

A transmission medium for transmitting the modulated signal may bewireless or wired. A transmission aspect of transmitting the modulatedsignal may be a broadcast (here, referred to a transmission aspect ofwhich transmission destination is not specified in advance), or acommunication (here, referred to a transmission aspect of whichtransmission destination is specified in advance). To be more specific,transmission of the modulated signal may be achieved by any of a radiobroadcast, a cable broadcast, a radio communication, and a cablecommunication.

For example, a broadcast station (such as broadcastfacilities)/receiving station (such as a TV set) of digital terrestrialbroadcasting is an example of the transmission device PROD_A/receptiondevice PROD_B transmitting and/or receiving the modulated signal on theradio broadcast. A broadcast station (such as broadcastfacilities)/receiving station (such as a TV set) of a cable televisionbroadcasting is an example of the transmission device PROD_A/receptiondevice PROD_B transmitting and/or receiving the modulated signal on thecable broadcast.

A server (such as a workstation)/client (such as a TV set, a personalcomputer, a smartphone) including a Video On Demand (VOD) service orvideo-sharing service using the Internet is an example of thetransmission device PROD_A/reception device PROD_B transmitting and/orreceiving the modulated signal on the communication (in general, awireless or wired transmission medium is used in LAN, and a wiredtransmission medium is used in WAN). Here, the personal computerincludes a desktop PC, laptop PC, and a tablet PC. The smartphone alsoincludes a multifunctional mobile phone terminal.

The video-sharing service client has a function to decode coded datadownloaded from the server to display on a display, and a function tocode a video imaged by a camera to upload to the server. To be morespecific, the video-sharing service client functions as both thetransmission device PROD__A and the reception device PROD_B.

Next, a description is given of that the image coding device 11 and theimage decoding device 31 described above can be used to record andreproduce the video with reference to FIGS. 34A and 34B.

FIG. 34A is a block diagram illustrating a configuration of a recordingdevice PROD_C equipped with the image coding device 11 described above.As illustrated in FIG. 34A, the recording device PROD_C includes acoding unit PROD_C1 that codes a video to acquire coded data, and awriting unit PROD_C2 that writes the coded data acquired by the codingunit PROD_C1 into a recording medium PROD_M. The image coding device 11described above is used as the coding unit PROD_C1.

The recording medium PROD_M may be (1) of a type that is built in therecording device PROD_C such as a Hard Disk Drive (HDD) and a SolidState Drive (SSD), (2) of a type that is connected with the recordingdevice PROD_C such as an SD memory card and a Universal Serial Bus (USB)flash memory, or (3) of a type that is loaded into a drive device (notillustrated) built in the recording device PROD_C such as a DigitalVersatile Disc (DVD) and a Blu-ray Disc (registered trademark) (BD).

The recording device PROD_C may further include, as resources forsupplying a video input to the coding unit PROD_C1, a camera PROD_C3that images a video, an input terminal PROD_C4 that inputs a video fromoutside, a receiver PROD_5 that receives a video, and an imageprocessing unit C6 that generates or processes an image. FIG. 34Aillustrates the configuration in which the recording device PROD_Cincludes all of the above components, but some of these may be omitted.

The receiver PROD_C5 may receive the video not coded, or the coded datacoded using a coding scheme for transmission different from the codingscheme for recording. In the latter case, a decoding unit fortransmission (not illustrated) which decodes the coded data coded usingthe coding scheme for transmission may be provided between the receiverPROD_C5 and the coding unit PROD_C1.

Examples of the recording device PROD_C like this include a DVDrecorder, a BD recorder, and a Hard Disk Drive (HDD) recorder (in thiscase, the input terminal PROD_C4 or the receiver PROD_C5 is mainly theresource for supplying the video). A camcorder (in this case, the cameraPROD_C3 is mainly the resource for supplying the video), a personalcomputer (in this case, the receiver PROD_C5 or the image processingunit C6 is mainly the resource for supplying the video), and asmartphone (in this case, the camera PROD_C3 or the receiver PROD_C5 ismainly the resource for supplying the video) are also included in theexamples of the recording device PROD__C like this.

FIG. 34B is a block diagram illustrating a configuration of areproducing device PROD_D equipped with the image decoding device 31. Asillustrated in FIG. 34B, the reproducing device PROD_D includes areading unit PROD_D1 that reads out coded data written into therecording medium PROD_M, and a decoding unit PROD_D2 that decodes thecoded data read out by the reading unit PROD_D1 to acquire a video. Theimage decoding device 31 described above is used as the decoding unitPROD_D2.

The recording medium PROD_M may be (1) of a type that is built in thereproducing device PROD_D such as an HDD and an SSD, (2) of a type thatis connected with the reproducing device PROD_D such as an SD memorycard and a USB flash memory, or (3) of a type that is loaded into adrive device (not illustrated) built in the reproducing device PROD__Dsuch as a DVD and a BD.

The reproducing device PROD_D may further include, as supplydestinations of the video output by the decoding unit PROD_D2, a displayPROD_D3 that displays the video, an output terminal PROD_D4 that outputsthe video from outside, and a transmitter PROD_D5 that transmits thevideo. FIG. 34B illustrates the configuration in which the reproducingdevice PROD_D includes all of the above components, but some of thesemay be omitted.

The transmitter PROD_D5 may transmit the video not coded, or the codeddata coded using a coding scheme for transmission different from thecoding scheme for recording. In the latter case, a coding unit (notillustrated) which codes the video using the coding scheme fortransmission may be provided between the decoding unit PROD_D2 and thetransmitter PROD_D5.

Examples of the reproducing device PROD_D like this include a DVDplayer, a BD player, and an HDD player (in this case, the outputterminal PROD_D4 connected with a TV set or the like is mainly thesupply destination of the video). A TV set (in this case, the displayPROD_D3 is mainly the supply destination of the video), a digitalsignage (also referred to as an electronic signage or an electronicbulletin board, and the display PROD_D3 or the transmitter PROD_D5 ismainly the supply destination of the video), a desktop PC (in this case,the output terminal PROD_D4 or the transmitter PROD_D5 is mainly thesupply destination of the video), a laptop or tablet PC (in this case,the display PROD_D3 or the transmitter PROD_D5 is mainly the supplydestination of the video), and a smartphone (in this case, the displayPROD_D3 or the transmitter PROD_D5 is mainly the supply destination ofthe video) are also included in the examples of the reproducing devicePROD_D like this.

(Hardware Implementation and Software Implementation)

The blocks in the image decoding device 31 and the image coding device11 described above may be implemented by hardware using a logic circuitformed on an integrated circuit (IC chip), or by software using aCentral Processing Unit (CPU).

In the latter case, the above-described devices include a CPU to executecommands of a program for achieving the functions, a Read Only Memory(ROM) to store the program, a Random Access Memory (RAM) to load theprogram, and a storage device (storage medium) such as a memory to storethe program and various types of data. The object of the disclosure canbe attained by that software realizing the functions described abovethat is a program code of a control program for the above respectivedevices (executable program, intermediate code program, source program)is recoded in a recording medium in a computer-readable manner, therecording medium is supplied to the above respective devices, and thecomputer (or the CPU or MPU) reads out the program code recorded in therecording medium for execution.

Examples of the above-described recording medium to use include tapessuch as a magnetic tape and a cassette tape, disks or discs including amagnetic disk such as a floppy (trade name) disk/hard disk or an opticaldisc such as a Compact Disc Read-Only Memory (CD-ROM)/Magneto-Optical(MO) disc/Mini Disc (MD)/Digital Versatile Disc (DVD)/CD Recordable(CD-R)/Blu-ray Disc (trade name), cards such as an IC card (including amemory card)/optical card, semiconductor memories such as a maskROM/Erasable Programmable Read-Only Memory (EPROM)/Electrically Erasableand Programmable Read-Only Memory (EEPROM: trade name)/flash ROM, orlogic circuits such as a Programmable logic device (PLD) and a FieldProgrammable Gate Array (FPGA).

The above-described devices may be configured to be connectable with acommunication network to be supplied with the above-described programcode through the communication network. This communication network isnot specifically limited so long as the program code can be transmitted.For example, the Internet, an intranet, an extranet, a Local AreaNetwork (LAN), an Integrated Services Digital Network (ISDN), aValue-Added Network (VAN), a Community Antenna television/CableTelevision (CATV) communication network, a Virtual Private Network, atelephone network, a mobile communication network, a satellitecommunication network and the like are available. Transmission mediaconstituting this communication network are not limited to a specificconfiguration or type so long as the program code can be transmitted.For example, a wired medium such as Institute of Electrical andElectronic Engineers (IEEE) 1394, a USB, a power-line carrier, a cableTV line, a telephone line, and an Asymmetric Digital Subscriber Line(ADSL), or a wireless medium such as an infrared-ray including InfraredData Association (IrDA) and a remote controller, Bluetooth (trade name),IEEE 802.11 wireless communication, High Data Rate (HDR), Near FieldCommunication (NFC), Digital Living Network Alliance (registeredtrademark) (DLNA), a mobile telephone network, a satellite circuit, anda digital terrestrial network are also available. The disclosure mayalso be implemented in a form of a computer data signal embedded in acarrier wave in which the above-described program code is embodied byelectronic transmission.

The disclosure is not limited to the above described embodiments, andcan be variously modified within a scope of the claims. To be morespecific, embodiments made by combining technical means which areadequately modified within the scope of the claims are also included inthe scope of an embodiment of the disclosure.

INDUSTRIAL APPLICABILITY

The disclosure can be preferably applied to an image decoding devicethat decodes coded data in which an image data is coded and an imagecoding device that generates coded data in which an image data is coded.The disclosure can be also preferably applied to a data structure of thecoded data which is generated by the image coding device and referred toby the image decoding device.

REFERENCE NUMERALS LIST

-   11 Image coding device (video coding device)-   31 Image decoding device (video decoding device)-   302 Prediction parameter decoding unit (prediction image generation    device)-   303 Inter-prediction parameter decoding unit (motion vector    derivation unit)-   308 Prediction image generation unit (prediction image generation    device)-   3031 Inter-prediction parameter decoding control unit (motion vector    derivation unit)-   30912 Compensation filter unit (filter unit)

What is claimed is:
 1. A prediction image generation device forgenerating a prediction image, the prediction image generation devicecomprising: an inter-prediction parameter decoding control circuitrythat derives a modified difference motion vector by using a motionvector difference value and that decodes a flag, from a coded data,specifying an accuracy of a motion vector, in a case that the motionvector difference value is not equal to zero; and a prediction imagegeneration circuitry that generates a prediction image by using a motionvector based on the modified difference motion vector, wherein theinter-prediction parameter decoding control circuitry determines a shiftvalue used for a modifying process of the motion vector difference valueby using the flag.
 2. A video decoding device comprising: the predictionimage generation device of claim 1, wherein the video decoding devicedecodes a coding target image by adding a residual image to theprediction image or subtracting the residual image from the predictionimage.
 3. A video coding device comprising: the prediction imagegeneration device of claim 1, wherein the video coding device codes aresidual of the prediction image and a coding target image.